<template>
	<div class="app-container">
		<div class="table-wrapper">
			<!-- 编辑 -->
			<el-form :inline="true" ref="formRef" :rules="rules" :disabled="route.query.id" label-position="right" :model="params" label-width="200px">
				<div class="form-inline">
					<el-row justify="center">
						<el-col :span="11">
							<el-form-item label="编号：" class="form-item" prop="number">
								<el-input v-model="params.number" placeholder="" :disabled="true" />
							</el-form-item>
						</el-col>
						<el-col :span="11">
							<el-form-item label="用途：" prop="purpose">
								<el-col :span="12">
									<el-form-item prop="purpose">
										<el-select v-model="params.purpose" placeholder="请选择" class="form-select"
											@change="useChange" :disabled="!isAdd">
											<el-option v-for="item in useOptions" :key="item.value" :label="item.label"
												:value="item.value">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col :span="1" class="text-center">
									<span class="text-gray-500">-</span>
								</el-col>
								<el-col :span="11">
									<el-form-item prop="purpose1">
										<el-select v-model="params.purpose1" placeholder="请选择" class="form-select"
											:disabled="!isAdd">
											<el-option v-for="item in use1Options" :key="item.value" :label="item.label"
												:value="item.value">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row justify="center">
						<el-col :span="11">
							<el-form-item label="区域：" class="form-item" prop="province">
								<el-form-item prop="province" style="width:120px;margin-right:10px;">
									<el-select v-model="params.province" placeholder="请选择省" @change="chooseProvince"
										clearable value-key="id" :disabled="!isAdd">
										<el-option v-for="item in provinceData" :key="item.id" :label="item.name"
											:value="item">
										</el-option>
									</el-select>
								</el-form-item>
								<el-form-item prop="city" style="width:120px;margin-right:10px;">
									<el-select v-model="params.city" placeholder="请选择市" @change="chooseCity" value-key="id"
										:disabled="!isAdd">
										<el-option v-for="item in cityData" :key="item.id" :label="item.name" :value="item">
										</el-option>
									</el-select>
								</el-form-item>
								<el-form-item prop="county" style="width:120px;">
									<el-select v-model="params.county" placeholder="请选择县" @change="chooseCounty"
										value-key="id" :disabled="!isAdd">
										<el-option v-for="item in areaData" :key="item.id" :label="item.name" :value="item">
										</el-option>
									</el-select>
								</el-form-item>
							</el-form-item>
						</el-col>
						<el-col :span="11">
							<el-form-item label="结构类型：" prop="structureType">
								<el-col :span="12">
									<el-form-item prop="structureType">
										<el-select v-model="params.structureType" placeholder="请选择" class="form-select"
											:disabled="!isAdd" @change="structureTypeChange">
											<el-option v-for="item in structureTypeOptions" :key="item.value"
												:label="item.label" :value="item.value"></el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col :span="1" class="text-center"><span class="text-gray-500">-</span></el-col>
								<el-col :span="11">
									<el-form-item prop="structureType1">
										<el-select v-model="params.structureType1" placeholder="请选择" class="form-select"
											:disabled="!isAdd" clearable>
											<el-option v-for="item in structureType1Options" :key="item.value"
												:label="item.label" :value="item.value"></el-option>
										</el-select>
									</el-form-item>
								</el-col>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row justify="center">
						<el-col :span="11">
							<el-form-item label="设防情况：" class="form-item" prop="fortification">
								<el-select v-model="params.fortification" placeholder="请选择" class="form-select"
									:disabled="!isAdd">
									<el-option v-for="item in fortificationOptions" :key="item.value" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="11">
							<el-form-item label="建造年代：" class="form-item" prop="years">
								<el-select v-model="params.years" placeholder="请选择" class="form-select" :disabled="!isAdd">
									<el-option v-for="item in yearsOptions" :key="item.value" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row justify="center">
						<el-col :span="11">
							<el-form-item label="层数：" prop="cs">
								<el-select v-model="params.cs" placeholder="请选择" class="form-select" clearable
									:disabled="!isAdd">
									<el-option v-for="item in csOptions" :key="item.value" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="11">
							<el-form-item label="维护时间:">
								<el-form-item prop="createTime">
									<el-date-picker v-model="params.createTime" type="date" placeholder="开始时间"
										value-format="YYYY-MM-DD" style="width: 100%" />
								</el-form-item>
							</el-form-item>
						</el-col>
						<!-- <el-col :span="11">
							<el-form-item label="是否对称配筋：" prop="symmReinfo">
								<el-radio-group v-model="params.symmReinfo" @change="onChangeSymmReinfo">
									<el-radio :label="1">是</el-radio>
									<el-radio :label="0">否</el-radio>
								</el-radio-group>
							</el-form-item>
						</el-col> -->
					</el-row>
					<!-- <el-row justify="center">
						<el-col :span="11">
							<el-form-item label="砌体类别：" class="form-item" prop="bwCategory">
								<el-select v-model="params.bwCategory" placeholder="请选择" class="form-select">
									<el-option v-for="item in masonryTypeOptions" :key="item.value" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="11">
							<el-form-item label="砂浆强度等级：" class="form-item" prop="scom">
								<el-select v-model="params.scom" placeholder="请选择" class="form-select">
									<el-option v-for="item in mortarStrengthOptions" :key="item.value" :label="item.label"
										:value="item.value">
									</el-option>
								</el-select>
							</el-form-item>
						</el-col>
					</el-row> -->
					<el-row justify="center">
						<el-col :span="11">
							<el-form-item label="维护人：" class="form-item" prop="userName">
								<el-input v-model="params.userName" placeholder="" />
							</el-form-item>
						</el-col>
						<el-col :span="11">
							<!-- <el-form-item label="维护人所属单位：" class="form-item" prop="maintainerUnit">
								<el-input v-model="params.maintainerUnit" placeholder="" />
							</el-form-item> -->
						</el-col>
					</el-row>
					<!-- <el-row justify="center">
						<el-col :span="22">
							<el-form-item label="维护人所属单位：" class="form-item" prop="maintainerUnit" style="width: 100%;">
								<el-input v-model="params.maintainerUnit" placeholder="" />
							</el-form-item>
						</el-col>
					</el-row> -->
					<el-row justify="center">
						<el-col :span="22">
							<el-form-item label="备注：" class="form-item" prop="remark" style="width: 100%;">
								<el-input type="textarea" v-model="params.remark" :rows="3" placeholder="请输入备注" />
							</el-form-item>
						</el-col>
					</el-row>
					<el-row justify="end" v-if="params.calculate_or_not != '1'">
						<el-form-item class="bottom-button">
							<el-popover placement="top-start" title="提示" :width="200" trigger="hover"
								content="计算结果不保存，若需要保存，请计算完成后点击页面“保存”按钮进行保存！">
								<template #reference>
									<el-button type="primary" @click="onRecalculate(formRef)"><el-icon>
											<EditPen />
										</el-icon>计算</el-button>
								</template>
							</el-popover>
							<el-button type="primary" @click="onSave(formRef)"><el-icon><Select /></el-icon>保存</el-button>
							<el-button @click="onRest(formRef)"><el-icon>
									<Refresh />
								</el-icon>重置</el-button>
						</el-form-item>
					</el-row>
				</div>

				<!-- 表格1 -->
				<div class="page-panel">
					<h1>
						一、矩形框架柱层间屈服剪力
						<!-- 公式 -->
						<Formula color="#666666" font-size="30px" fontWeight="100" letterSpacing="0" :option="[
							{ content: '∑', },
							{ content: 'Q', left: '-2px' },
							{ content: 'czi', scale: 0.5, position: 'bottom', left: '-10px' },
						]"></Formula>
					</h1>
					<h3>
						请输入以下参数值：
						<el-button v-if="params.calculate_or_not != '1'" type="primary" @click="showDialog = true"
							style="margin:20px 0;">导入柱参数</el-button>
					</h3>
					<!-- 数据导入弹框 -->
					<import-data v-if="showDialog" v-model="showDialog" ref="paramsDialog" :uploadUrl="urlUpload"
						downloadFileName="钢筋混凝土结构参数信息数据模板.xlsx" @importSuccess="onImport"></import-data>
					<el-table class="listTable" ref="table1Ref" border :data="params.tableData1" row-key="pillarCode"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column v-if="params.calculate_or_not != '1'" fixed="left" label="操作" width="80"
							header-align="center" align="center">
							<template #default="scope">
								<el-button @click.prevent="handleCalcRemove(params.tableData1, scope.$index)" type="text"
									size="small">删除</el-button>
							</template>
						</el-table-column>
						<el-table-column prop="parameter" label="基础参数列" header-align="center" align="center">
							<el-table-column label="柱参数" header-align="center" align="center">
								<el-table-column prop="floorNum" label="层号" header-align="center" align="center"
									width="100">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.floorNum`" :rules="rules.floorNum">
											<el-input type="number" v-model="row.floorNum" placeholder="" maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="pillarCode" label="柱编号" header-align="center" align="center"
									width="100">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.pillarCode`" :rules="rules.pillarCode">
											<el-input v-model="row.pillarCode" placeholder="" clearable />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="fck" label="钢筋混凝土强度等级" header-align="center" align="center"
									width="100">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.fck`" :rules="rules.fck">
											<el-input v-model="row.fck" placeholder="" clearable />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="pillarHeight" header-align="center" align="center" width="100">
									<template #header>
										<div>柱净高Hn</div>
										<div>（m）</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.pillarHeight`"
											:rules="rules.pillarHeight">
											<el-input type="number" v-model="row.pillarHeight" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="pillarSectionHeight" header-align="center" align="center"
									width="100">
									<template #header>
										<div>柱验算方向的截面高h</div>
										<div>（mm）</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.pillarSectionHeight`"
											:rules="rules.pillarSectionHeight">
											<el-input type="number" v-model="row.pillarSectionHeight" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="pillarSectionWidth" header-align="center" align="center" width="100">
									<template #header>
										<div>柱验算方向的截面宽b</div>
										<div>（mm）</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.pillarSectionWidth`"
											:rules="rules.pillarSectionWidth">
											<el-input type="number" v-model="row.pillarSectionWidth" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="stirrupNum" label="柱箍筋牌号" header-align="center" align="center"
									width="100">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.stirrupNum`" :rules="rules.stirrupNum">
											<el-input v-model="row.stirrupNum" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="sectionalArea" header-align="center" align="center" width="100">
									<template #header>
										<div>柱箍筋截面积Asv</div>
										<div>(mm^2)</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.sectionalArea`"
											:rules="rules.sectionalArea">
											<el-input type="number" v-model="row.sectionalArea" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="spacing" header-align="center" align="center" width="100">
									<template #header>
										<div>柱箍筋间距s</div>
										<div>(mm)</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.spacing`" :rules="rules.spacing">
											<el-input type="number" v-model="row.spacing" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column label="柱下端纵向钢筋牌号" prop="stirrupDownNum" header-align="center"
									align="center" width="100">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.stirrupDownNum`"
											:rules="rules.stirrupDownNum">
											<el-input v-model="row.stirrupDownNum" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="sectionalDownArea1" header-align="center" align="center" width="100">
									<template #header>
										<div>柱下端受压区纵向钢筋面积As' </div>
										<div>(mm^2)</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.sectionalDownArea1`"
											:rules="rules.sectionalDownArea1">
											<el-input type="number" v-model="row.sectionalDownArea1" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="sectionalDownArea2" header-align="center" align="center" width="100">
									<template #header>
										<div>柱下端受拉区纵向钢筋面积As </div>
										<div>(mm^2)</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.sectionalDownArea2`"
											:rules="rules.sectionalDownArea2">
											<el-input type="number" v-model="row.sectionalDownArea2" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column label="柱上端纵向钢筋牌号" prop="stirrupUpNum" header-align="center" align="center"
									width="100">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.stirrupUpNum`"
											:rules="rules.stirrupUpNum">
											<el-input v-model="row.stirrupUpNum" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="sectionalUpArea1" header-align="center" align="center" width="100">
									<template #header>
										<div>柱上端受压区纵向钢筋面积As' </div>
										<div>(mm^2)</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.sectionalUpArea1`"
											:rules="rules.sectionalUpArea1">
											<el-input type="number" v-model="row.sectionalUpArea1" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="sectionalUpArea2" header-align="center" align="center" width="100">
									<template #header>
										<div>柱上端受拉区纵向钢筋面积As </div>
										<div>(mm^2)</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.sectionalUpArea2`"
											:rules="rules.sectionalUpArea2">
											<el-input type="number" v-model="row.sectionalUpArea2" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="distance" header-align="center" align="center" width="100">
									<template #header>
										<div>受拉筋合力点到受拉边缘的距离as</div>
										<div>（mm）</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.distance`" :rules="rules.distance">
											<el-input type="number" v-model="row.distance" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="distance2" header-align="center" align="center" width="100">
									<template #header>
										<div>受压筋合力点距受压边缘的距离 as‘</div>
										<div>（mm）</div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.distance2`" :rules="rules.distance2">
											<el-input type="number" v-model="row.distance2" placeholder="" maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
							</el-table-column>
						</el-table-column>
						<el-table-column label="梁参数" header-align="center" align="center">
							<el-table-column label="梁基本信息" header-align="center" align="center">
								<el-table-column prop="beamNum" label="梁编号" header-align="center" align="center"
									width="100">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.beamNum`" :rules="rules.beamNum">
											<el-input v-model="row.beamNum" placeholder="" maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="beamSectionWidth" header-align="center" align="center" width="200">
									<template #header>
										<div>梁截面宽度</div>
										<div><span class="color-red">bL（mm）</span></div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.beamSectionWidth`"
											:rules="rules.beamSectionWidth">
											<el-input type="number" v-model="row.beamSectionWidth" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="beamSectionHeight" header-align="center" align="center" width="200">
									<template #header>
										<div>梁截面高度</div>
										<div><span class="color-red">hL（mm）</span></div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.beamSectionHeight`"
											:rules="rules.beamSectionHeight">
											<el-input type="number" v-model="row.beamSectionHeight" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="beamSpan" header-align="center" align="center" width="200">
									<template #header>
										<div>梁的跨度</div>
										<div><span class="color-red">L（mm）</span></div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.beamSpan`" :rules="rules.beamSpan">
											<el-input type="number" v-model="row.beamSpan" placeholder="" maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="beamStirrupNum" label="梁受拉钢筋牌号" header-align="center" align="center"
									width="200">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.beamStirrupNum`"
											:rules="rules.beamStirrupNum">
											<el-input v-model="row.beamStirrupNum" placeholder="" />
										</el-form-item>
									</template>
								</el-table-column>
							</el-table-column>
							<el-table-column label="梁左端" header-align="center" align="center">
								<el-table-column prop="beamLeftHeigth" label="梁有效高度(mm)" header-align="center"
									align="center" width="200">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.beamLeftHeigth`"
											:rules="rules.beamLeftHeigth">
											<el-input type="number" v-model="row.beamLeftHeigth" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="leftAsPull" header-align="center" align="center" width="200">
									<template #header>
										<div>梁受拉区纵筋面积</div>
										<div><span class="color-red">As(mm^2)</span></div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.leftAsPull`" :rules="rules.leftAsPull">
											<el-input type="number" v-model="row.leftAsPull" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="leftAsPush" header-align="center" align="center" width="200">
									<template #header>
										<div>梁受拉区纵筋面积</div>
										<div><span class="color-red">As'(mm^2)</span></div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.leftAsPush`" :rules="rules.leftAsPush">
											<el-input type="number" v-model="row.leftAsPush" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
							</el-table-column>
							<el-table-column label="梁右端" header-align="center" align="center">
								<el-table-column prop="beamRightHeight" label="梁有效高度(mm)" header-align="center"
									align="center" width="200">
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.beamRightHeight`"
											:rules="rules.beamRightHeight">
											<el-input type="number" v-model="row.beamRightHeight" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="rigthAsPush" header-align="center" align="center" width="200">
									<template #header>
										<div>梁受拉区纵筋面积</div>
										<div><span class="color-red">As(mm^2)</span></div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.rigthAsPush`" :rules="rules.rigthAsPush">
											<el-input type="number" v-model="row.rigthAsPush" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
								<el-table-column prop="rigthAsPull" header-align="center" align="center" width="200">
									<template #header>
										<div>梁受拉区纵筋面积</div>
										<div><span class="color-red">As'(mm^2)</span></div>
									</template>
									<template #default="{ row, $index }">
										<el-form-item :prop="`tableData1.${$index}.rigthAsPull`" :rules="rules.rigthAsPull">
											<el-input type="number" v-model="row.rigthAsPull" placeholder=""
												maxlength="10" />
										</el-form-item>
									</template>
								</el-table-column>
							</el-table-column>
						</el-table-column>
					</el-table>
					<el-button v-if="params.calculate_or_not != '1'" class="add" style="width: 100%" :plain="true"
						@click="handleCalcAdd(params.tableData1, 'table1')">
						<el-icon style="vertical-align: middle">
							<Plus />
						</el-icon>
					</el-button>
					<div>
						<el-table class="listTable" ref="table2Ref" border :data="params.tableData1"
							:cell-style="{ border: '1px solid #FaFaFa' }"
							:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
							<el-table-column v-if="params.calculate_or_not != '1'" label="操作" width="60" fixed="left"
								header-align="center" align="center">
								<template #default="scope">
									<el-button @click.prevent="handleCalcRemove(params.tableData1, scope.$index)"
										type="text" size="small">删除</el-button>
								</template>
							</el-table-column>
							<el-table-column prop="parameter" header-align="center" align="center">
								<template #header>
									<div>计算结果列 <span class="color-blue" @click="handleExplain('zhu')">公式说明</span></div>
								</template>
								<el-table-column>
									<el-table-column prop="pillarCode" label="柱编号" header-align="center" align="center"
										width="100">
										<template #default="{ row }">{{ row.pillarCode }}</template>
									</el-table-column>
								</el-table-column>
								<el-table-column>
									<el-table-column prop="nu" header-align="center" align="center" width="100">
										<template #header>
											<!-- 公式 -->
											<Formula font-size="32px" :option="[
												{ content: 'N', fontWeight: 'bold' },
												{ content: 'U', scale: 0.6, position: 'top' }
											]"></Formula>
										</template>
									</el-table-column>
								</el-table-column>
								<el-table-column>
									<el-table-column prop="nl" header-align="center" align="center" width="100">
										<template #header>
											<!-- 公式 -->
											<Formula font-size="32px" :option="[
												{ content: 'N', fontWeight: 'bold' },
												{ content: 'L', scale: 0.6, position: 'top' }
											]"></Formula>
										</template>
									</el-table-column>
								</el-table-column>
								<!-- <el-table-column>
									<el-table-column prop="" header-align="center" align="center" width="100">
										<template #header>
											<Formula font-size="32px" :option="[
												{ content: 'N', fontWeight: 'bold' },
											]"></Formula>
										</template>
									</el-table-column>
								</el-table-column> -->
								<el-table-column label="框架为强梁弱柱型框架柱" header-align="center">
									<el-table-column prop="muz" header-align="center" align="center" width="280">
										<template #header>
											<!-- 公式 -->
											<Formula display="block" tagOffset="-6px" fontSize="24px" :option="[
												{ content: 'M', sub: 'z' },
												{ content: '=', margin: '0 8px' },
												{ content: '0.8' },
												{ content: 'A', sub: 's' },
												{ content: 'f', skew: '-15deg', sub: 'yk' },
												{ content: 'h' },
												{ content: '+' },
												{ content: '0.4Nh' },
											]"></Formula>
											<div>(KN•m)</div>
										</template>
									</el-table-column>
									<el-table-column prop="mlz" header-align="center" align="center" width="280">
										<template #header>
											<!-- 公式 -->
											<Formula display="block" tagOffset="-6px" fontSize="24px" :option="[
												{ content: 'M', sub: 'z' },
												{ content: '=', margin: '0 8px' },
												{ content: '0.8' },
												{ content: 'A', sub: 's' },
												{ content: 'f', skew: '-15deg', sub: 'yk' },
												{ content: 'h' },
												{ content: '+' },
												{ content: '0.4Nh' },
											]"></Formula>
											<div>(KN•m)</div>
										</template>
									</el-table-column>
								</el-table-column>
								<el-table-column label="对称配筋矩形截面偏压柱" header-align="center">
									<el-table-column prop="mucys" header-align="center" align="center" width="450">
										<template #header>
											<!-- 公式 -->
											<Formula display="block" tagOffset="-6px" fontSize="24px" :option="[
												{ content: 'M', sub: 'cy' },
												// { content: '=', margin: '0 8px' },
												// { content: 'f', skew: '-15deg', sub: 'yk' },
												// { content: 'A', sub: 's' },
												// { content: '(' },
												// { content: 'h', sub: '0' },
												// { content: '-' },
												// { content: 'a', sub: '\'', sub: 's' },
												// { content: ')' },
												// { content: '+' },
												// { content: '0.5Nh' },
												// { content: '(' },
												// { content: '1-N/' },
												// { content: 'f', skew: '-15deg', sub: 'cmk' },
												// { content: 'bh' },
												// { content: ')' },
											]"></Formula>
											<div>(KN•m)</div>
										</template>
									</el-table-column>
									<!-- <el-table-column prop="mlcys" header-align="center" align="center" width="600">
										<template #header>
											<Formula display="block" tagOffset="-6px" fontSize="24px" :option="[
												{ content: 'M', sub: 'cy' },
												{ content: '=', margin: '0 8px' },
												{ content: 'f', skew: '-15deg', sub: 'yk' },
												{ content: 'A', sub: 's' },
												{ content: '(' },
												{ content: 'h', sub: '0' },
												{ content: '-' },
												{ content: 'a', super: '\'', sub: 's' },
												{ content: ')' },
												{ content: '+' },
												{ content: 'ξ(1-0.5ξ)' },
												{ content: 'f', skew: '-15deg', sub: 'cmk' },
												{ content: 'bh', super: '2', sub: '0' },
												{ content: '-N(0.5h-' },
												{ content: 'a', super: '\'', sub: 's' },
												{ content: ')' },
											]"></Formula>
											<div>(KN•m)</div>
										</template>
									</el-table-column> -->
								</el-table-column>
								<el-table-column label="非强梁弱柱型框架时" header-align="center">
									<el-table-column prop="mucy" header-align="center" align="center" width="450">
										<template #header>
											<!-- 公式 -->
											<MultilineFormula display="block" tagOffset="-6px" fontSize="24px" :option="[
												{ content: 'M', super: 'U', sub: 'cy' },
												{ content: '=', margin: '0 8px' },
												{ content: '∑' },
												{ content: 'M', super: 'U', sub: 'by' },
												{
													rows: [
														[{ content: 'K', sub: 'i' }],
														[
															{ content: 'K', sub: 'i' },
															{ content: '+' },
															{ content: 'K', sub: 'i+1' },
														]
													]
												},
											]">
											</MultilineFormula>
											<div>(KN•m)</div>
										</template>
									</el-table-column>
									<el-table-column prop="mlcy" header-align="center" align="center" width="600">
										<template #header>
											<!-- 公式 -->
											<MultilineFormula display="block" tagOffset="-6px" fontSize="24px" :option="[
												{ content: 'M', super: 'L', sub: 'cy' },
												{ content: '=', margin: '0 8px' },
												{ content: '∑' },
												{ content: 'M', super: 'L', sub: 'by' },
												{
													rows: [
														[{ content: 'K', sub: 'i' }],
														[
															{ content: 'K', sub: 'i' },
															{ content: '+' },
															{ content: 'K', sub: 'i-1' },
														]
													]
												},
											]">
											</MultilineFormula>
										</template>
									</el-table-column>
								</el-table-column>
								<el-table-column>
									<el-table-column prop="qczM" header-align="center" align="center" width="200">
										<template #header>
											<!-- 公式 -->
											<MultilineFormula tagOffset="-6px" fontSize="24px" :option="[
												{ content: 'Q', sub: 'cz' },
												{ content: '=', margin: '0 8px' },
												{
													rows: [
														[
															{ content: 'M', super: 'U', sub: 'cz' },
															{ content: '+' },
															{ content: 'M', super: 'L', sub: 'cz' },
														],
														[{ content: 'H', sub: 'n' }]
													]
												},
											]">
											</MultilineFormula>
										</template>
									</el-table-column>
								</el-table-column>
								<el-table-column>
									<el-table-column prop="qczN" header-align="center" align="center" width="420">
										<template #header>
											<!-- 公式 -->
											<MultilineFormula tagOffset="-6px" fontSize="24px" :option="[
												{ content: 'Q', sub: 'cz' },
												{ content: '=', margin: '0 8px' },
												{
													rows: [
														[{ content: '0.16' }],
														[{ content: 'λ+1.5' }]
													]
												},
												{ content: 'f', skew: '-15deg', sub: 'ck' },
												{ content: 'bh', sub: '0' },
												{ content: '+' },
												{ content: 'f', skew: '-15deg', sub: 'yvk' },
												{
													rows: [
														[{ content: 'A', skew: '-15deg', sub: 'sv' }],
														[{ content: 'S' }]
													]
												},
												{ content: 'h', sub: '0' },
												{ content: '+0.056' },
												{ content: 'N', skew: '-15deg' },
											]">
											</MultilineFormula>
										</template>
									</el-table-column>
								</el-table-column>
								<el-table-column>
									<el-table-column prop="qcz" header-align="center" align="center" width="200">
										<template #header>
											<div>每根柱楼层屈服剪力</div>
											<div>(KN)</div>
										</template>
									</el-table-column>
								</el-table-column>
								<el-table-column>
									<el-table-column prop="qz" header-align="center" align="center" width="200">
										<template #header>
											楼层屈服剪力Qz(KN)
										</template>
									</el-table-column>
								</el-table-column>
							</el-table-column>
						</el-table>
					</div>
				</div>

				<!-- <div class="div-formula listTable">
					<Formula font-size="30px" fontWeight="100" :option="[
						{ content: 'N', skew: '-10deg', fontWeight: 'bold' },
						{ content: '=', margin: '0 8px', fontWeight: 'bold' },
						{ content: '∑', scale: 1.5, topContent: 'n', bottomContent: 'i=s', fontWeight: 'bold' },
						{ content: 'N', skew: '-10deg', left: '-2px', super: 'u', sub: 'i', fontWeight: 'bold' },
					]"></Formula>
					&nbsp;=&nbsp;
					<div class="formula-result">
						<el-input v-model="params.nvalue" placeholder="请输入"
							@change="(value) => params.nvalue = proxy.decimalPlaces(value, 4)" />
					</div>
					<Formula style="margin-left:40px;" font-size="30px" fontWeight="100" :option="[
						{ content: 'N', skew: '-10deg', sub: 'max', fontWeight: '900' },
						{ content: '=', margin: '0 8px', fontWeight: 'bold' },
						{ content: 'b', skew: '-15deg' },
						{ content: 'h', skew: '-15deg' },
						{ content: 'f', skew: '-15deg', sub: 'ck' },
						{ content: '+' },
						{ content: '(' },
						{ content: 'A', skew: '-15deg', sub: 's' },
						{ content: '+' },
						{ content: 'A', skew: '-15deg', super: '\'', sub: 's' },
						{ content: ')' },
						{ content: 'f', skew: '-15deg', super: '\'', sub: 'yk' },
					]"></Formula>
					<Formula style="margin-left:40px;" font-size="30px" fontWeight="100" :option="[
						{ content: 'N', skew: '-10deg', sub: 'min', fontWeight: '900' },
						{ content: '=', margin: '0 8px', fontWeight: 'bold' },
						{ content: '(' },
						{ content: 'A', skew: '-15deg', sub: 's' },
						{ content: '+' },
						{ content: 'A', skew: '-15deg', super: '\'', sub: 's' },
						{ content: ')' },
						{ content: 'f', skew: '-15deg', sub: 'yk' },
					]"></Formula>
				</div> -->

				<!-- 表格3 -->
				<div class="page-panel">
					<h1>
						二、砖填充墙钢筋混凝土框架结构的层间现有受剪承载力
						<!-- 公式 -->
						<Formula color="#666666" font-size="30px" fontWeight="100" letterSpacing="0" :option="[
							{ content: '∑', },
							{ content: 'Q', left: '-2px' },
							{ content: 'mzi', scale: 0.5, position: 'bottom', left: '-10px' },
						]"></Formula>
						<!-- <div class="mcyu-mcyl color-red">MCYU与MCYL的计算</div> -->
					</h1>
					<!-- <el-table class="listTable" ref="table3Ref" border :data="params.tableData1"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column v-if="params.calculate_or_not != '1'" label="操作" width="60" fixed="left"
							header-align="center" align="center">
							<template #default="scope">
								<el-button @click.prevent="handleCalcRemove(params.tableData1, scope.$index)" type="text"
									size="small">删除</el-button>
							</template>
						</el-table-column>
						<el-table-column prop="pillarCode" label="柱编号" header-align="center" align="center" width="100">
							<template #default="{ row }">
								{{ row.pillarCode }}
							</template>
						</el-table-column>
						<el-table-column prop="am" header-align="center" align="center" width="200">
							<template #header>
								砖填充墙水平截面面积<span class="color-red">Am</span>
							</template>
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableData1.${$index}.am`" :rules="rules.am">
									<el-input type="number" v-model="row.am" placeholder="" maxlength="10" />
								</el-form-item>
							</template>
						</el-table-column>
						<el-table-column prop="calH0" header-align="center" align="center" width="200">
							<template #header>
								柱的计算高度<span class="color-red">H0</span>
							</template>
							<template #default="{ row }">
								<el-input type="number" v-model="row.calH0" placeholder="" maxlength="10" />
							</template>
						</el-table-column>
						<el-table-column prop="hasTcq" label="两侧是否有填充墙" header-align="center" align="center" width="200">
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableData1.${$index}.hasTcq`" :rules="rules.hasTcq">
									<el-select v-model="row.hasTcq" placeholder="请选择" class="form-select">
										<el-option label="是" value="0"></el-option>
										<el-option label="否" value="1"></el-option>
									</el-select>
								</el-form-item>
							</template>
						</el-table-column>
						<el-table-column prop="iwParameter" label="填充墙参数" header-align="center">
							<el-table-column prop="infilledWallLayerHeight" header-align="center" align="center" width="100">
								<template #header>
									<div>填充墙层高</div>
									<div>（mm）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData1.${$index}.infilledWallLayerHeight`" :rules="params.tableData1[$index].hasTcq == 1 ? rules.infilledWallLayerHeight : []">
										<el-input type="number" v-model="row.infilledWallLayerHeight" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="infilledWallThickness" header-align="center" align="center" width="100">
								<template #header>
									<div>填充墙厚</div>
									<div>（mm）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData1.${$index}.infilledWallThickness`" :rules="params.tableData1[$index].hasTcq == 1 ? rules.infilledWallThickness : []">
										<el-input type="number" v-model="row.infilledWallThickness" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="filledWallWidth" header-align="center" align="center" width="100">
								<template #header>
									<div>填充墙宽度</div>
									<div>（mm）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData1.${$index}.filledWallWidth`" :rules="params.tableData1[$index].hasTcq == 1 ? rules.filledWallWidth : []">
										<el-input type="number" v-model="row.filledWallWidth" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
						</el-table-column>
						<el-table-column prop="nu" header-align="center" align="center" width="100">
							<template #header>
								<Formula font-size="32px" :option="[
									{ content: 'N', fontWeight: 'bold' },
									{ content: 'U', scale: 0.6, position: 'top' }
								]"></Formula>
							</template>
						</el-table-column>
						<el-table-column prop="nl" header-align="center" align="center" width="100">
							<template #header>
								<Formula font-size="32px" :option="[
									{ content: 'N', fontWeight: 'bold' },
									{ content: 'L', scale: 0.6, position: 'top' }
								]"></Formula>
							</template>
						</el-table-column>
						<el-table-column prop="en" header-align="center" align="center" width="220">
							<template #header>
								砌体强度的正压力影响系数<span class="color-red">ζN</span>
							</template>
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableData1.${$index}.en`" :rules="rules.en">
									<el-input type="number" v-model="row.en" placeholder="" maxlength="10" />
								</el-form-item>
							</template>
						</el-table-column>
						<el-table-column prop="fvkStrength" header-align="center" align="center" width="200">
							<template #header>
								砖墙的抗剪强度标准值<span class="color-red">fvk</span>
							</template>
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableData1.${$index}.fvkStrength`" :rules="rules.fvkStrength">
									<el-input type="number" v-model="row.fvkStrength" placeholder="" maxlength="10" />
								</el-form-item>
							</template>
						</el-table-column>
						<el-table-column prop="qmy" header-align="center" align="center" width="400">
							<template #header>
								<Formula tagOffset="-6px" fontSize="24px" :option="[
									{ content: 'Q', sub: 'my' },
									{ content: '=', margin: '0 8px' },
									{ content: '∑' },
									{ content: '(' },
									{ content: 'M', super: 'U', sub: 'cy' },
									{ content: '+' },
									{ content: 'M', super: 'L', sub: 'cy' },
									{ content: ')' },
									{ content: '/' },
									{ content: 'H', sub: '0' },
									{ content: '+' },
									{ content: 'ζ', sub: 'N' },
									{ content: 'f', skew: '-15deg', sub: 'vk' },
									{ content: 'A', sub: 'm' },
								]"></Formula>
							</template>
						</el-table-column>
					</el-table> -->
					<el-table class="listTable" ref="table3Ref" border :data="params.tableData3"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column v-if="params.calculate_or_not != '1'" label="操作" width="60" fixed="left"
							header-align="center" align="center">
							<template #default="scope">
								<el-button @click.prevent="handleCalcRemove(params.tableData3, scope.$index)" type="text"
									size="small">删除</el-button>
							</template>
						</el-table-column>
						<el-table-column label="填充墙参数" header-align="center">
							<el-table-column prop="floorNum" label="楼层号" header-align="center" align="center">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData3.${$index}.floorNum`" :rules="rules.floorNum">
										<el-input type="number" v-model="row.floorNum" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="tcpNum" label="填充墙编号" header-align="center" align="center">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData3.${$index}.tcpNum`" :rules="rules.tcpNum">
										<el-input v-model="row.tcpNum" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="bwCategory" label="填充墙砌体类别" header-align="center" align="center"
								width="150">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData3.${$index}.bwCategory`" :rules="rules.bwCategory">
										<el-select v-model="row.bwCategory" placeholder="请选择">
											<el-option v-for="item in bwCategoryOptions" :key="item.value"
												:label="item.label" :value="item.value">
											</el-option>
										</el-select>
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="scom" label="填充墙砂浆强度等级" header-align="center" align="center">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData3.${$index}.scom`" :rules="rules.scom">
										<el-select v-model="row.scom" placeholder="请选择">
											<el-option v-for="item in scomOption" :key="item.value" :label="item.label"
												:value="item.value">
											</el-option>
										</el-select>
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="tcqWidth" header-align="center" align="center">
								<template #header>
									<div>b填充墙截面宽度</div>
									<div>（mm）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData3.${$index}.tcqWidth`" :rules="rules.tcqWidth">
										<el-input type="number" v-model="row.tcqWidth" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="tcqHeight" header-align="center" align="center">
								<template #header>
									<div>h填充墙的高度</div>
									<div>（mm）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData3.${$index}.tcqHeight`" :rules="rules.tcqHeight">
										<el-input type="number" v-model="row.tcqHeight" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="tcqThickness" header-align="center" align="center">
								<template #header>
									<div>t填充墙的厚度</div>
									<div>（mm）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData3.${$index}.tcqThickness`" :rules="rules.tcqThickness">
										<el-input type="number" v-model="row.tcqThickness" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
						</el-table-column>
						<el-table-column header-align="center" align="center">
							<template #header>
								<div>计算结果列 <span class="color-blue" @click="handleExplain('tcq')">公式说明</span></div>
							</template>
							<el-table-column prop="qmy" header-align="center" align="center" width="400">
								<template #header>
									<Formula tagOffset="-6px" fontSize="24px" :option="[
										{ content: '楼层受剪承载力', scale: 0.6, fontWeight: 'blod' },
										{ content: 'Q', sub: 'my' },
									]"></Formula>
								</template>
							</el-table-column>
						</el-table-column>
					</el-table>
					<el-button v-if="params.calculate_or_not != '1'" class="add" style="width: 100%" :plain="true"
						@click="handleCalcAdd(params.tableData3, 'table3')">
						<el-icon style="vertical-align: middle">
							<Plus />
						</el-icon>
					</el-button>
				</div>

				<!-- 表格4 -->
				<div class="page-panel">
					<h1>
						三、带边框柱的钢筋混凝土抗震墙的层间现有受剪承载力
						<!-- 公式 -->
						<Formula color="#666666" font-size="30px" fontWeight="100" letterSpacing="0" :option="[
							{ content: '∑', },
							{ content: 'Q', left: '-2px' },
							{ content: 'wzi', scale: 0.5, position: 'bottom', left: '-10px' },
						]"></Formula>
					</h1>
					<el-table class="listTable" ref="table4Ref" border :data="params.tableData4"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column v-if="params.calculate_or_not != '1'" label="操作" width="60" fixed="left"
							header-align="center" align="center">
							<template #default="scope">
								<el-button @click.prevent="handleCalcRemove(params.tableData4, scope.$index)" type="text"
									size="small">删除</el-button>
							</template>
						</el-table-column>
						<!-- <el-table-column prop="pillarCode" label="柱编号" header-align="center" align="center" width="100">
							<template #default="{ row }">
								{{ row.pillarCode }}
							</template>
						</el-table-column> -->
						<el-table-column prop="iwParameter" label="剪力墙参数" header-align="center">
							<el-table-column prop="floorNum" label="楼层号" header-align="center" align="center">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.floorNum`" :rules="rules.floorNum">
										<el-input type="number" v-model="row.floorNum" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="jlqNum" label="剪力墙编号" header-align="center" align="center">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.jlqNum`" :rules="rules.jlqNum">
										<el-input v-model="row.jlqNum" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<!-- <el-table-column prop="floorHeight" header-align="center" align="center" width="100">
								<template #header>
									<div>层高</div>
									<div>（m）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.floorHeight`" :rules="rules.floorHeight">
										<el-input type="number" v-model="row.floorHeight" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column> -->
							<el-table-column prop="fck" label="混凝土强度等级" header-align="center" align="center">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.fck`" :rules="rules.fck">
										<el-input v-model="row.fck" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="kzqWidth" header-align="center" align="center">
								<template #header>
									<div>抗震墙厚度</div>
									<div>（mm）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.kzqWidth`" :rules="rules.kzqWidth">
										<el-input type="number" v-model="row.kzqWidth" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="kzqHeight" header-align="center" align="center">
								<template #header>
									<div>抗震墙截面高度</div>
									<div>（mm）</div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.kzqHeight`" :rules="rules.kzqHeight">
										<el-input type="number" v-model="row.kzqHeight" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="rebarNum" label="水平钢筋牌号" header-align="center" align="center"
								width="150">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.rebarNum`" :rules="rules.rebarNum">
										<el-input v-model="row.rebarNum" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="as" label="配置在同一水平截面内的水平钢筋截面面积（mm^2）" header-align="center"
								align="center" width="200">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.as`" :rules="rules.as">
										<el-input type="number" v-model="row.as" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="s2" label="S2 剪力墙水平向钢筋间距(mm)" header-align="center" align="center"
								width="150">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData4.${$index}.s2`" :rules="rules.s2">
										<el-input type="number" v-model="row.s2" placeholder="" />
									</el-form-item>
								</template>
							</el-table-column>
						</el-table-column>
						<el-table-column header-align="center" align="center">
							<template #header>
								<div>计算结果列 <span class="color-blue" @click="handleExplain('jlq')">公式说明</span></div>
							</template>
							<el-table-column prop="qwy" header-align="center" align="center" width="400">
								<template #header>
									<Formula tagOffset="-6px" fontSize="24px" :option="[
										{ content: '楼层地震剪力', scale: 0.6, fontWeight: 'blod' },
										{ content: 'Q', sub: 'wy' },
									]"></Formula>
								</template>
							</el-table-column>
						</el-table-column>
					</el-table>
					<el-button v-if="params.calculate_or_not != '1'" class="add" style="width: 100%" :plain="true"
						@click="handleCalcAdd(params.tableData4, 'table4')">
						<el-icon style="vertical-align: middle">
							<Plus />
						</el-icon>
					</el-button>
				</div>

				<!-- 表格5 -->
				<div class="page-panel">
					<h1>四、地震剪力计算</h1>
					<div>
						<el-form-item label="场地类别：" prop="sc" :rules="rules.sc">
							<el-select v-model="params.sc" placeholder="请选择" class="form-select" @change="onChangeType">
								<el-option v-for="item in siteTypeOptions" :key="item.value" :label="item.label"
									:value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
						<el-form-item label="设计地震分组：" prop="eqGroup" :rules="rules.eqGroup">
							<el-select v-model="params.eqGroup" placeholder="请选择" class="form-select"
								@change="onChangeGroup">
								<el-option v-for="item in groupOptions" :key="item.value" :label="item.label"
									:value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
						<el-form-item label="阻尼比：" prop="dampRatio" :rules="rules.dampRatio">
							<el-input-number v-model="params.dampRatio" placeholder="请输入" :min="0" maxlength="10"
								@change="(value) => params.dampRatio = proxy.decimalPlaces(value, 4)" />
						</el-form-item>
					</div>
					<!-- <h1>
						输入
						<Formula fontWeight="bold" tagOffset="-6px" style="line-height: 35px;" :option="[
							{ content: 'a', sub: 'max' },
						]"></Formula>
						值 :
					</h1>
					<el-table class="listTable" ref="tableAmaxRef" border :data="params.tableDataAmax"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column prop="Amax" label="烈度" header-align="center" align="center">
							<template #default>
								<Formula fontSize="20px" fontWeight="bold" tagOffset="-6px" :option="[
									{ content: 'a', sub: 'max' },
								]"></Formula>
							</template>
						</el-table-column>
						<el-table-column prop="amax6" label="VI" header-align="center" align="center">
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableDataAmax.${$index}.amax6`" :rules="rules.amax6">
									<el-input type="number" v-model="row.amax6" placeholder="请输入" maxlength="10" />
								</el-form-item>
							</template>
						</el-table-column>
						<el-table-column prop="amax7" label="VII" header-align="center" align="center">
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableDataAmax.${$index}.amax7`" :rules="rules.amax7">
									<el-input type="number" v-model="row.amax7" placeholder="请输入" maxlength="10" />
								</el-form-item>
							</template>
						</el-table-column>
						<el-table-column prop="amax8" label="Ⅷ" header-align="center" align="center">
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableDataAmax.${$index}.amax8`" :rules="rules.amax8">
									<el-input type="number" v-model="row.amax8" placeholder="请输入" maxlength="10" />
								</el-form-item>
							</template>
						</el-table-column>
						<el-table-column prop="amax9" label="Ⅸ" header-align="center" align="center">
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableDataAmax.${$index}.amax9`" :rules="rules.amax9">
									<el-input type="number" v-model="row.amax9" placeholder="请输入" maxlength="10" />
								</el-form-item>
							</template>
						</el-table-column>
						<el-table-column prop="amax10" label="Ⅹ" header-align="center" align="center">
							<template #default="{ row, $index }">
								<el-form-item :prop="`tableDataAmax.${$index}.amax10`" :rules="rules.amax10">
									<el-input type="number" v-model="row.amax10" placeholder="请输入" maxlength="10" />
								</el-form-item>
							</template>
						</el-table-column>
					</el-table> -->
					<el-table class="listTable" ref="table5Ref" border :data="params.tableData2"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column v-if="params.calculate_or_not != '1'" label="操作" width="60" fixed="left"
							header-align="center" align="center">
							<template #default="scope">
								<el-button @click.prevent="handleCalcRemove(params.tableData2, scope.$index)" type="text"
									size="small">删除</el-button>
							</template>
						</el-table-column>
						<el-table-column label="参数信息" align="center">
							<el-table-column prop="floorNum" label="层号" header-align="center" align="center" width="100">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData2.${$index}.floorNum`" :rules="rules.floorNum">
										<el-input type="number" v-model="row.floorNum" placeholder="" maxlength="10" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="trussSpacing" label="每榀间距" header-align="center" align="center"
								width="120">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData2.${$index}.trussSpacing`" :rules="rules.trussSpacing">
										<el-input type="number" v-model="row.trussSpacing" placeholder="" maxlength="10" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="numberOfPieces" label="榀数" header-align="center" align="center"
								width="120">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData2.${$index}.numberOfPieces`" :rules="rules.numberOfPieces">
										<el-input type="number" v-model="row.numberOfPieces" placeholder="" maxlength="10" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="liveLoad" label="每层荷载值(KN/m^2)" header-align="center" align="center"
								width="120">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData2.${$index}.liveLoad`" :rules="rules.liveLoad">
										<el-input type="number" v-model="row.liveLoad" placeholder="" maxlength="10" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="buildWidth" label="建筑物宽度(mm)" header-align="center" align="center"
								width="120">
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData2.${$index}.buildWidth`" :rules="rules.buildWidth">
										<el-input type="number" v-model="row.buildWidth" placeholder="" maxlength="10" />
									</el-form-item>
								</template>
							</el-table-column>
							<el-table-column prop="floorHeight" header-align="center" align="center" width="120">
								<template #header>
									<div>层高</div>
									<div><span class="color-red">（Hj）</span></div>
								</template>
								<template #default="{ row, $index }">
									<el-form-item :prop="`tableData2.${$index}.floorHeight`" :rules="rules.floorHeight">
										<el-input type="number" v-model="row.floorHeight" :min="0" placeholder=""
											maxlength="10" />
									</el-form-item>
								</template>
							</el-table-column>
						</el-table-column>
						<el-table-column align="center">
							<template #header>
								<div>计算结果列 <span class="color-blue" @click="handleExplain('jljs')">公式说明</span></div>
							</template>
							<el-table-column prop="t1" header-align="center" align="center" width="300">
								<template #header>
									<!-- 公式 -->
									<MultilineFormula tagOffset="-6px" font-size="20px" :option="[
										{ content: 'T', sub: '1' },
										{ content: '=', margin: '0 8px' },
										{ content: '0.25*0.53*' },
										{ content: '10', super: '-3' },
										{
											rows: [
												[
													{ content: 'H', super: '2' },
												],
												[
													{ content: '3', scale: '0.6', top: '-10px' },
													{
														rows: [
															[{ content: 'B' }]
														],
														radical: true,
														style: { padding: '5px 2px' },
													},
												]
											]
										},
									]"></MultilineFormula>
								</template>
								<!-- <template #default="{ row, $index }">
									<el-form-item :prop="`tableData2.${$index}.t1`">
										<el-input type="number" v-model="row.t1" :min="0" placeholder="" maxlength="10" />
									</el-form-item>
								</template> -->
							</el-table-column>
							<el-table-column prop="gi" header-align="center" align="center" width="100">
								<template #header>
									<Formula tagOffset="-6px" font-size="20px" :option="[
										{ content: 'G', sub: 'i' },
										// { content: '=', margin: '0 8px' },
										// { content: 'N', skew: '-15deg', super: 'U', fontWeight: 'bold' },
										// { content: '+' },
										// { content: '0.5*跨度*柱距*活荷载' },
									]"></Formula>
								</template>
							</el-table-column>
							<el-table-column prop="nvalue" header-align="center" align="center" width="100">
								<template #header>
									<!-- 公式 -->
									<Formula font-size="32px" :option="[
										{ content: 'N', fontWeight: 'bold' },
									]"></Formula>
								</template>
							</el-table-column>
							<!-- <el-table-column prop="qek" header-align="center" align="center" width="200">
								<template #header>
									<Formula font-size="20px" :option="[
										{ content: 'Q', fontWeight: 'bold' },
										{ content: 'Ek', scale: '0.8' },
										{ content: '=', margin: '0 8px' },
										{ content: '0.85α1', fontWeight: 'bold' },
										{ content: 'GE', fontWeight: 'bold' },
									]"></Formula>
								</template>
							</el-table-column> -->
							<el-table-column prop="sigemaN" header-align="center" align="center" width="100">
								<template #header>
									<!-- 公式 -->
									<Formula font-size="20px" :option="[
										{ content: 'δ', scale: '1.2' },
										{ content: 'n' },
									]"></Formula>
								</template>
								<!-- <template #default="{ row }">
									<el-input type="number" v-model="row.sigemaN" placeholder="" maxlength="10" />
								</template> -->
							</el-table-column>
							<!-- <el-table-column prop="qmi" header-align="center" align="center" width="300">
								<template #header>
									<MultilineFormula tagOffset="-6px" fontSize="24px" :option="[
										{ content: 'Q', sub: 'mi' },
										{ content: '=', margin: '0 8px' },
										{
											rows: [
												[
													{ content: 'G', sub: 'i' },
													{ content: 'H', sub: 'i' },
												],
												[
													{ content: '∑', topContent: 'n', bottomContent: 'j=1', tagLineHeight: '0.6' },
													{ content: 'G', sub: 'j' },
													{ content: 'H', sub: 'j' },
												]
											]
										},
										{ content: '(' },
										{ content: '1' },
										{ content: '-' },
										{ content: 'δ', sub: 'n' },
										{ content: ')' },
										{ content: 'Q', sub: 'Ek' },
									]">
									</MultilineFormula>
								</template>
							</el-table-column> -->
							<el-table-column prop="qmz" label="楼层受剪承载力" header-align="center" align="center" width="120">
								<!-- <template #default="{ row }">
									<el-input v-model="row.qmz" placeholder="" maxlength="10" />
								</template> -->
							</el-table-column>
						</el-table-column>
					</el-table>
					<el-button v-if="params.calculate_or_not != '1'" class="add" style="width: 100%" :plain="true"
						@click="handleCalcAdd(params.tableData2, 'floorTable')">
						<el-icon style="vertical-align: middle">
							<Plus />
						</el-icon>
					</el-button>
				</div>
				<div>
					<Formula  display="block" tagOffset="-3px" font-size="24px" style="margin-left: 20px;" :option="[
						{ content: 'Q', fontWeight: 'bold' },
						{ content: 'Ek', scale: '0.8' },
						{ content: '=', margin: '0 8px' },
						{ content: '0.85α1' },
						{ content: 'GE' },
					]"></Formula>
				</div>
				<el-table class="listTable elTable" ref="table6Ref" border v-if="newArr.length > 0" :data="newArr"
					:cell-style="{ border: '1px solid #FaFaFa' }"
					:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
					<el-table-column label="层号" align="center">
						<el-table-column label="q" align="center" width="200">
							<template #default="{ row, $index }">
								<span v-if="row.si == '6度'">qek（Ⅵ）</span>
								<span v-if="row.si == '7度'">qek（Ⅶ）</span>
								<span v-if="row.si == '8度'">qek（Ⅷ）</span>
								<span v-if="row.si == '9度'">qek（Ⅸ）</span>
								<span v-if="row.si == '10度'">qek（Ⅹ）</span>
							</template>
						</el-table-column>
					</el-table-column>
					<el-table-column v-for="item in labelArr" :prop="item + 'qek'" :label="item" header-align="center"
						align="center"></el-table-column>
				</el-table>

				<div>
					<MultilineFormula display="inline-block" font-size="24px" style="margin-left: 20px;" :option="[
						{ content: 'Q', sub: 'mi' },
						{ content: '=', margin: '0 8px' },
						{
							rows: [
								[
									{ content: 'G', sub: 'i' },
									{ content: 'H', sub: 'i' },
								],
								[
									{ content: '∑', topContent: 'n', bottomContent: 'j=1', tagLineHeight: '0.6' },
									{ content: 'G', sub: 'j' },
									{ content: 'H', sub: 'j' },
								]
							]
						},
						{ content: '(' },
						{ content: '1' },
						{ content: '-' },
						{ content: 'δ', sub: 'n' },
						{ content: ')' },
						{ content: 'Q', sub: 'Ek' },
					]">
					</MultilineFormula>
				</div>
				<el-table class="listTable elTable" ref="table6Ref" border v-if="newArr.length > 0" :data="newArr"
					:cell-style="{ border: '1px solid #FaFaFa' }"
					:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
					<el-table-column label="层号" align="center">
						<el-table-column label="q" align="center" width="200">
							<template #default="{ row, $index }">
								<span v-if="row.si == '6度'">qm（Ⅵ）</span>
								<span v-if="row.si == '7度'">qm（Ⅶ）</span>
								<span v-if="row.si == '8度'">qm（Ⅷ）</span>
								<span v-if="row.si == '9度'">qm（Ⅸ）</span>
								<span v-if="row.si == '10度'">qm（Ⅹ）</span>
							</template>
						</el-table-column>
					</el-table-column>
					<el-table-column v-for="item in labelArr" :prop="item + 'qmi'" :label="item" header-align="center"
						align="center"></el-table-column>
				</el-table>
				<!-- 表格6 -->
				<div class="page-panel">
					<p>选择<span class="color-red" style="cursor: pointer;" @click="handleExplain('ci')">钢筋混凝土结构房屋修正系数Ci</span>完成对抗震指数的修正</p>
					<!-- <el-table class="listTable" ref="ciTableRef" border :data="tableData3" @row-click="handleRowClick"
						@selection-change="handleSelectionChange" @select="handleSelect"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column type="selection" width="55" />
						<el-table-column prop="condition" label="条件" header-align="center" align="left"></el-table-column>
						<el-table-column prop="ci" width="400" label="修正系数Ci" header-align="center" align="center">
							<el-table-column v-for="(item, index) in tableCiColumn" :key="index"
								:prop="'content' + item.cbrsId" :label="item.info" width="200" />
						</el-table-column>
					</el-table> -->
					<div class="ci-form">
						<el-row justify="start">
							<el-form-item :label="'（1）' + params.ciType1" label-width="300px" class="form-item"
								prop="ciType1Value">
								<el-radio-group v-model="params.ciType1Value">
									<el-radio :label="0">满足</el-radio>
									<el-radio :label="1">不满足</el-radio>
								</el-radio-group>
							</el-form-item>
						</el-row>
						<el-row justify="start">
							<el-form-item :label="'（2）' + params.ciType2" label-width="300px" class="form-item"
								prop="ciType2Value">
								<el-radio-group v-model="params.ciType2Value">
									<el-radio :label="0">是</el-radio>
									<el-radio :label="1">否</el-radio>
								</el-radio-group>
							</el-form-item>
						</el-row>
						<el-row justify="start">
							<el-form-item :label="'（3）' + params.ciType3" label-width="300px" prop="ciType3Value">
								<el-radio-group v-model="params.ciType3Value">
									<el-radio :label="0">满足</el-radio>
									<el-radio :label="1">不满足</el-radio>
								</el-radio-group>
							</el-form-item>
						</el-row>
						<el-row justify="start">
							<el-form-item :label="'（4）' + params.ciType4" label-width="300px" class="form-item"
								prop="ciType4Value">
								<el-select v-model="params.ciType4Value" placeholder="请选择" class="form-select" clearable
									style="width: 320px;">
									<el-option v-for="item in standardOptions" :key="item.value" :label="item.label"
										:value="item.value"></el-option>
								</el-select>
							</el-form-item>
						</el-row>
					</div>
				</div>

				<div class="page-panel">
					<h1>
						五、楼层屈服剪力
					</h1>
					<!-- 公式 -->
					<Formula display="block" font-size="32px" style="margin-left: 20px;" :option="[
						{ content: 'Q', sub: 'zi' },
						{ content: '=', margin: '0 8px' },
						{ content: '∑', scale: '1.5' },
						{ content: 'Q', sub: 'czi' },
						{ content: '+0.7' },
						{ content: '∑', scale: '1.5' },
						{ content: 'Q', sub: 'mzi' },
						{ content: '+0.7' },
						{ content: '∑', scale: '1.5' },
						{ content: 'Q', sub: 'wzi' },
						// { content: '*', margin: '0 8px' },
						// { content: '剪力墙片数/榀数', },
					]"></Formula>
				</div>

				<!-- 表格7 -->
				<div class="page-panel">
					<h1>六、楼层的剪力屈服系数</h1>
					<div>
						<Formula display="block" tagOffset="-3px" font-size="30px" style="margin-left: 20px;" :option="[
							{ content: 'q', scale: '1.2', sub: 'i' },
							{ content: '=', margin: '0 8px' },
							{ content: 'Q', sub: 'zi' },
							{ content: '/' },
							{ content: 'Q', sub: 'mi' },
						]"></Formula>
						<!-- <Formula display="block" tagOffset="-3px" font-size="30px" style="margin-left: 20px;" :option="[
							{ content: 'Qi' },
							{ content: '=', margin: '0 8px' },
							{ content: 'Qzi' },
							{ content: '/' },
							{ content: 'Qmi' },
						]"></Formula> -->
					</div>
					<el-table class="listTable elTable" ref="table6Ref" border v-if="newArr.length > 0" :data="newArr"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column label="层号" align="center">
							<el-table-column label="q" align="center" width="200">
								<template #default="{ row, $index }">
									<span v-if="row.si == '6度'">q（Ⅵ）</span>
									<span v-if="row.si == '7度'">q（Ⅶ）</span>
									<span v-if="row.si == '8度'">q（Ⅷ）</span>
									<span v-if="row.si == '9度'">q（Ⅸ）</span>
									<span v-if="row.si == '10度'">q（Ⅹ）</span>
								</template>
							</el-table-column>
						</el-table-column>
						<el-table-column v-for="item in labelArr" :prop="item + 'qi'" :label="item" header-align="center"
							align="center"></el-table-column>

						<!-- <el-table-column prop="floorNum" label="层号" header-align="center" align="center"
							width="70"></el-table-column>
						<el-table-column prop="qi6" label="q（Ⅵ）" header-align="center" align="center"></el-table-column>
						<el-table-column prop="qi7" label="q（Ⅶ）" header-align="center" align="center"></el-table-column>
						<el-table-column prop="qi8" label="q（Ⅷ）" header-align="center" align="center"></el-table-column>
						<el-table-column prop="qi9" label="q（Ⅸ）" header-align="center" align="center"></el-table-column>
						<el-table-column prop="qi10" label="q（Ⅹ）" header-align="center" align="center"></el-table-column> -->
					</el-table>
				</div>

				<!-- 表格8 -->
				<div class="page-panel">
					<h1>七、楼层最大延伸率的平均值</h1>
					<div style="display:flex;align-items: center;">
						<!-- 公式 -->
						<MultilineFormula display="inline-block" font-size="32px" style="margin-left: 20px;" :option="[
							{ content: 'μ', scale: '1.5', sub: 'i', topContent: '_', tagLineHeight: '0', top: '-8px' },
							{ content: '=', margin: '0 8px' },
							{
								rows: [
									[
										{ content: '1+' },
										{ content: '∑', scale: '1.5' },
										{ content: 'C', sub: 'k' },
									],
									[
										{ content: '√' },
										{ content: '—', top: '-11px', left: '-10px' },
										{ content: 'q', sub: 'i', left: '-35px' },
									]
								]
							},
							{ content: 'exp[2.6(1-' },
							{ content: 'q', sub: 'i' },
							{ content: ')]' },
						]"></MultilineFormula>
						<span style="margin-left: 20px;" class="color-blue" @click="handleExplain('yslpjz')">公式说明</span>
					</div>

					<el-table class="listTable elTable" ref="table7Ref" border v-if="newArr.length > 0" :data="newArr"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column label="层号" width="200" align="center">
							<el-table-column align="center" width="200">
								<template #header>
									<Formula font-size="20px" :option="[
										{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
									]"></Formula>
								</template>
								<template #default="{ row, $index }">
									<span v-if="row.si == '6度'">
										<Formula font-size="14px" :option="[
											{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
											{ content: '(Ⅵ)' },
										]"></Formula>
									</span>
									<span v-if="row.si == '7度'">
										<Formula font-size="14px" :option="[
											{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
											{ content: '(Ⅶ)' },
										]"></Formula>
									</span>
									<span v-if="row.si == '8度'">
										<Formula font-size="14px" :option="[
											{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
											{ content: '(Ⅷ)' },
										]"></Formula>
									</span>
									<span v-if="row.si == '9度'">
										<Formula font-size="14px" :option="[
											{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
											{ content: '(Ⅸ)' },
										]"></Formula>
									</span>
									<span v-if="row.si == '10度'">
										<Formula font-size="14px" :option="[
											{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
											{ content: '(Ⅹ)' },
										]"></Formula>
									</span>
								</template>
							</el-table-column>
						</el-table-column>
						<el-table-column v-for="item in labelArr" :prop="item + 'ui'" :label="item" header-align="center"
							align="center"></el-table-column>
					</el-table>

					<!-- <el-table class="listTable" ref="table7Ref" border :data="tableData4"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column prop="floorNum" label="层号" header-align="center" align="center"
							width="70"></el-table-column>
						<el-table-column prop="ui6" header-align="center" align="center">
							<template #header>
								<Formula font-size="20px" :option="[
									{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
									{ content: '(Ⅵ)' },
								]"></Formula>
							</template>
						</el-table-column>
						<el-table-column prop="ui7" header-align="center" align="center">
							<template #header>
								<Formula font-size="20px" :option="[
									{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
									{ content: '(Ⅶ)' },
								]"></Formula>
							</template>
						</el-table-column>
						<el-table-column prop="ui8" header-align="center" align="center">
							<template #header>
								<Formula font-size="20px" :option="[
									{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
									{ content: '(Ⅷ)' },
								]"></Formula>
							</template>
						</el-table-column>
						<el-table-column prop="ui9" header-align="center" align="center">
							<template #header>
								<Formula font-size="20px" :option="[
									{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
									{ content: '(Ⅸ)' },
								]"></Formula>
							</template>
						</el-table-column>
						<el-table-column prop="ui10" header-align="center" align="center">
							<template #header>
								<Formula font-size="20px" :option="[
									{ content: 'μ', topContent: '_', tagLineHeight: '0.3', top: '-3px' },
									{ content: '(Ⅹ)' },
								]"></Formula>
							</template>
						</el-table-column>
					</el-table> -->
				</div>

				<!-- 表格9 -->
				<div class="page-panel">
					<h1>钢筋混凝土框架地震易损性分析结果</h1>
					<el-table class="listTable" ref="table9Ref" border v-if="newArr.length > 0" :data="newArr"
						:cell-style="{ border: '1px solid #FaFaFa' }"
						:header-cell-style="{ border: '1px solid #FaFaFa', borderLeft: 'none', borderTop: 'none' }">
						<el-table-column prop="floorNum" label="破坏程度" header-align="center" align="center" width="100">
							<template #default="{ row, $index }">
								<span v-if="row.si == '6度'">Ⅵ破坏状态</span>
								<span v-if="row.si == '7度'">Ⅶ破坏状态</span>
								<span v-if="row.si == '8度'">Ⅷ破坏状态</span>
								<span v-if="row.si == '9度'">Ⅸ破坏状态</span>
								<span v-if="row.si == '10度'">Ⅹ破坏状态</span>
							</template>
						</el-table-column>
						<el-table-column v-for="item in labelArr" :prop="item + 'damageCondition'" :label="item"
							header-align="center" align="center"></el-table-column>
						<el-table-column prop="evaluationResult" label="评定结果" header-align="center"
							align="center"></el-table-column>
					</el-table>
				</div>
			</el-form>
		</div>
		<Explain v-model:open="importOpen" :title="titleExplain" />
	</div>
</template>

<script setup>
import { nextTick, reactive, toRefs } from "vue";
// 引入store
import useUserStore from '@/store/modules/user';
import useDictStore from '@/store/modules/dict';
// 获取用户信息
import { getInfo } from '@/api/login';
// 引入接口
import {
	getReinforcedByIdApi,//根据id查询详情
	getAllCsValueApi,//获取砌体类别、砂浆强度等级
	reinforcedCalculationApi,//计算
	reinforcedSaveApi,//保存
	uploadColumnUrl, //导入
	getDataById, //回显
} from "@/api/buildingVulnerAnalysis/buildingVulnerAnalysis.js";
// 引入行政区划接口
import { getProvince, getChildArea } from "@/api/system/division";
// 引入公式组件
import Formula from '@/components/Formula';
import MultilineFormula from '@/components/Formula/multiline';
import Explain from './Explain'
// 公用方法
import { parseTime } from "@/utils/ruoyi.js";
// 引入导入弹框
import ImportData from "@/components/ImportData";

// 获取当前实例
const { proxy } = getCurrentInstance();
// 获取pinia
const userStore = useUserStore();
const dictStore = useDictStore();
// 全局路由对象
const router = useRouter();
// 当前路由对象
const route = useRoute();

// 是否是新增页，有路由参数是详情页，否则是新增页
let isAdd = computed(() => (route.query.id ? false : true));
// 用户名
const userName = computed(() => userStore.name || '');
// 所属机构名称
const orgName = computed(() => userStore.orgName || '');
// 表单对象
const formRef = ref();
// Ci表格对象
const ciTableRef = ref();

// 导入数据接口路径
const urlUpload = ref(uploadColumnUrl);

// 当前柱编号数
let floor = 1;
// 当前层编号数
let column = 1;

const data = reactive({
	// 表单参数
	params: {
		//是否已计算
		calculate_or_not: '0',
		// 不用传后端自己获取
		userName: userName.value, //维护人
		maintainerUnit: orgName.value, //维护人所属单位
		createTime: proxy.parseTime(new Date()) || '', //维护时间

		ccpiId: '', // String
		//建筑编号
		number: '', // String
		//用途
		purpose: '', // String
		purpose1: '', // String
		//省
		province: '', // String
		//市
		city: '', // String
		//区县
		county: '', // String
		//结构类型
		structureType: '', // String
		structureType1: '', // String
		//建造年代
		years: '', // String
		// 层数
		cs: '',
		//设防情况
		fortification: '', // String
		//备注
		remark: '', // String

		// Ci系数表单
		ciType1: '现浇钢筋混凝土构件沿高度断面无突变',
		ciType1Value: undefined,
		ciType2: '平面规则',
		ciType2Value: undefined,
		ciType3: '施工质量良好',
		ciType3Value: undefined,
		ciType4: '建筑抗震设计规范',
		ciType4Value: undefined,

		//框架类型
		frameType: '', // String
		//混凝土的弹性模量
		elasticityModulus: null, // Number
		ck: null, // Number
		//是否为对称配筋
		symmReinfo: null, // Number
		//砌体类别
		bwCategory: null, // Number
		//砂浆强度等级
		scom: null, // Number
		//楼长
		floorLength: null, // Number
		nvalue: null, // 计算n值
		sc: '', // 场地类别
		eqGroup: '', // 设计地震分组
		dampRatio: 0.05, // 阻尼比

		//地震剪力中的amax 每级地震都不相同；
		amax6: null, // Number
		amax7: null, // Number
		amax8: null, // Number
		amax9: null, // Number
		amax10: null, // Number
		tableDataAmax: [{
			'amax6': null,
			'amax7': null,
			'amax8': null,
			'amax9': null,
			'amax10': null
		}],
		//表格
		tableData1: [
			/*{
				ccpiId: '', // String
				// 柱编号
				pillarCode: '', // String
				// 每榀间距（m）
				trussSpacing: null, // Number
				// 跨度
				span: null, // Number
				// 层号
				floorNum: null, // Number
				// 剪力墙片数
				shearWallPieces: null, // Number
				// 剪力墙层高
				shearWallFloorHeight: null, // Number
				// 剪力墙厚
				shearWallThickness: null, // Number
				// 剪力墙宽度
				shearWallWidth: null, // Number
				// 榀数
				numberOfPieces: null, // Number
				// 柱净高Hn
				pillarHeight: null, // Number
				// 柱截面宽b(mm)
				pillarSectionWidth: null, // Number
				// 柱截面高h(mm)
				pillarSectionHeight: null, // Number
				// 纵筋fyk
				fyk: null, // Number
				// 纵向受拉筋总截面积As
				portraitSectionalArea: null, // Number
				// 纵向受压筋总截面积As’
				portraitSectionalArea1: null, // Number
				// 柱截面有效高
				h0: null, // Number
				// 混凝土抗压强度标准值fck
				fck: null, // Number
				// 界限受压区高度ζbk
				bk: null, // Number
				// 总跨度
				totalSpan: null, // Number
				// 受压筋合理点距受压边缘的距离
				distance: null, // Number
				// 板厚
				boardThickness: null, // Number
				// 砼标号
				concreteCode: null, // Number
				// fvk
				fvk: null, // Number
				// 箍筋间距s
				spacing: null, // Number
				// 箍筋截面积Asv
				sectionalArea: null, // Number
				// 剪力墙Ash
				ash: null, // Number
				// 剪力墙箍筋间距
				s2: null, // Number
				// 剪力墙箍筋标准值
				fyvk: null, // Number
				// 柱子的弹性模量
				eb: null, // Number
				// 中柱还是边柱
				pillarPosition: '', // String
				// 梁参数 // Array
				roofBeams: [
					{
						// 梁编号
						beamNum: '',
						// 梁高
						beamHeigth: null,
						// 梁截面宽
						beamSectionWidth: null,
						// 梁截面高
						beamSectionHeight: null,
						// 梁的弹性模量
						el: null,
					}
				],
				// 砖填充墙水平截面面积
				am: null, // Number
				// 两侧是否有填充墙
				hasTcq: null, // Number
				// 填充墙层高
				infilledWallLayerHeight: null, // Number
				// 填充墙厚
				infilledWallThickness: null, // Number
				// 填充墙宽度
				filledWallWidth: null, // Number
				// 砌体强度的正压力影响系数
				en: null, // Number
				// 砖墙的抗剪强度标准值fvk
				fvkStrength: null, // Number

				// 抗震墙的截面积
				wallSectionalArea: null, // Number
				// 水平钢筋截面面积Ash
				sectionalAsh: null, // Number
				// 抗震墙的计算剪跨比
				jkb: null, // Number
			}*/
		],
		tableData2: [],
		tableData3: [],
		tableData4: [],
		tableData5: [],
	},
	// 表单验证规则
	rules: {
		// number: [{ required: true, message: '编号未生成', trigger: 'blur' }],
		province: [{ required: true, message: '请选择', trigger: 'change' }],
		structureType: [{ required: true, message: '请选择', trigger: 'change' }],
		purpose: [{ required: true, message: '请选择', trigger: 'change' }],
		purpose1: [{ required: true, message: '请选择', trigger: 'change' }],
		years: [{ required: true, message: '请选择', trigger: 'change' }],
		fortification: [{ required: true, message: '请选择', trigger: 'change' }],
		cs: [{ required: true, message: '请选择', trigger: 'change' }],
		symmReinfo: [{ required: true, message: '请选择', trigger: 'change' }],
		bwCategory: [{ required: true, message: '请选择', trigger: 'change' }],
		scom: [{ required: true, message: '请选择', trigger: 'change' }],

		// tableData1：柱参数
		pillarCode: [{ required: true, message: '请输入', trigger: 'change' }],
		floorNum: [{ required: true, message: '请输入', trigger: 'change' }],
		// 每榀间距（m）
		trussSpacing: [{ required: true, message: '请输入', trigger: 'change' }],
		// 每层荷载值
		nvalue: [{ required: true, message: '请输入', trigger: 'change' }],
		// 跨度
		span: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱净高Hn
		pillarHeight: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱截面宽b(mm)
		pillarSectionWidth: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱截面高h(mm)
		pillarSectionHeight: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱箍筋牌号
		stirrupNum: [{ required: true, message: '请输入', trigger: 'change' }],
		// 箍筋间距s
		spacing: [{ required: true, message: '请输入', trigger: 'change' }],
		// 箍筋截面积Asv
		sectionalArea: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱下端纵向钢筋牌号
		stirrupDownNum: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱下端受压区纵向钢筋面积As'
		sectionalDownArea1: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱下端受拉区纵向钢筋面积As
		sectionalDownArea2: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱上端纵向钢筋牌号
		stirrupUpNum: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱上端受压区纵向钢筋面积As'
		sectionalUpArea1: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱上端受拉区纵向钢筋面积As
		sectionalUpArea2: [{ required: true, message: '请输入', trigger: 'change' }],
		// 受拉筋合力点到受拉边缘的距离as
		distance: [{ required: true, message: '请输入', trigger: 'change' }],
		// 受拉筋合力点到受拉边缘的距离as ‘
		distance2: [{ required: true, message: '请输入', trigger: 'change' }],

		// 梁参数
		// beamNum: [{ required: true, message: '请输入', trigger: 'change' }],
		// beamSectionWidth: [{ required: true, message: '请输入', trigger: 'change' }],
		// beamSectionHeight: [{ required: true, message: '请输入', trigger: 'change' }],
		// beamSpan: [{ required: true, message: '请输入', trigger: 'change' }],
		// beamLeftHeigth: [{ required: true, message: '请输入', trigger: 'change' }],
		// beamRightHeight: [{ required: true, message: '请输入', trigger: 'change' }],
		// leftAsPull: [{ required: true, message: '请输入', trigger: 'change' }],
		// leftAsPush: [{ required: true, message: '请输入', trigger: 'change' }],
		// rigthAsPush: [{ required: true, message: '请输入', trigger: 'change' }],
		// rigthAsPull: [{ required: true, message: '请输入', trigger: 'change' }],
		// beamStirrupNum: [{ required: true, message: '请输入', trigger: 'change' }],


		// 纵筋fyk
		fyk: [{ required: true, message: '请输入', trigger: 'change' }],
		// 纵向受拉筋总截面积As
		portraitSectionalArea: [{ required: true, message: '请输入', trigger: 'change' }],
		// 纵向受压筋总截面积As’
		portraitSectionalArea1: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱截面有效高
		h0: [{ required: true, message: '请输入', trigger: 'change' }],
		// 混凝土抗压强度标准值fck
		fck: [{ required: true, message: '请输入', trigger: 'change' }],
		// 界限受压区高度ζbk
		bk: [{ required: true, message: '请选择', trigger: 'change' }],
		// 总跨度
		totalSpan: [{ required: true, message: '请输入', trigger: 'change' }],
		// 受压筋合理点距受压边缘的距离
		distance: [{ required: true, message: '请输入', trigger: 'change' }],
		// 板厚
		boardThickness: [{ required: true, message: '请输入', trigger: 'change' }],
		// 砼标号
		concreteCode: [{ required: true, message: '请输入', trigger: 'change' }],
		// fvk
		fvk: [{ required: true, message: '请输入', trigger: 'change' }],
		// 剪力墙Ash
		ash: [{ required: true, message: '请输入', trigger: 'change' }],
		// 剪力墙箍筋间距
		s2: [{ required: true, message: '请输入', trigger: 'change' }],
		// 剪力墙箍筋标准值
		fyvk: [{ required: true, message: '请输入', trigger: 'change' }],
		// 柱子的弹性模量
		eb: [{ required: true, message: '请选择', trigger: 'change' }],
		// 中柱还是边柱
		pillarPosition: [{ required: true, message: '请选择', trigger: 'change' }],

		// 二、填充墙参数
		tcpNum: [{ required: true, message: '请输入', trigger: 'change' }],
		// 填充墙砌体类别
		bwCategory: [{ required: true, message: '请输入', trigger: 'change' }],
		// 填充墙砌体类别
		scom: [{ required: true, message: '请输入', trigger: 'change' }],
		// 填充墙砂浆强度等级
		bwCategory: [{ required: true, message: '请输入', trigger: 'change' }],
		// b填充墙截面宽度
		tcqWidth: [{ required: true, message: '请输入', trigger: 'change' }],
		// h填充墙的高度
		tcqHeight: [{ required: true, message: '请输入', trigger: 'change' }],
		// t填充墙的厚度
		tcqThickness: [{ required: true, message: '请输入', trigger: 'change' }],

		// 三、剪力墙参数
		// 层高
		jlqNum: [{ required: true, message: '请输入', trigger: 'change' }],
		// 混凝土强度等级
		fck: [{ required: true, message: '请输入', trigger: 'change' }],
		// 抗震墙厚度
		kzqWidth: [{ required: true, message: '请输入', trigger: 'change' }],
		// 抗震墙截面高度
		kzqHeight: [{ required: true, message: '请输入', trigger: 'change' }],
		// 水平钢筋牌号
		rebarNum: [{ required: true, message: '请输入', trigger: 'change' }],
		// 配置在同一水平截面内的水平钢筋截面面积
		as: [{ required: true, message: '请输入', trigger: 'change' }],
		// S2 剪力墙水平向钢筋间距
		s2: [{ required: true, message: '请输入', trigger: 'change' }],

		// 砖填充墙水平截面面积 已舍弃
		am: [{ required: true, message: '请输入', trigger: 'change' }],
		// 两侧是否有填充墙
		hasTcq: [{ required: true, message: '请选择', trigger: 'change' }],
		// 填充墙层高
		infilledWallLayerHeight: [{ required: true, message: '请输入', trigger: 'change' }],
		// 填充墙厚
		infilledWallThickness: [{ required: true, message: '请输入', trigger: 'change' }],
		// 填充墙宽度
		filledWallWidth: [{ required: true, message: '请输入', trigger: 'change' }],
		// 砌体强度的正压力影响系数
		en: [{ required: true, message: '请输入', trigger: 'change' }],
		// 砖墙的抗剪强度标准值fvk
		fvkStrength: [{ required: true, message: '请输入', trigger: 'change' }],

		// 抗震墙的截面积
		wallSectionalArea: [{ required: true, message: '请输入', trigger: 'change' }],
		// 水平钢筋截面面积Ash
		sectionalAsh: [{ required: true, message: '请输入', trigger: 'change' }],
		// 抗震墙的计算剪跨比
		jkb: [{ required: true, message: '请输入', trigger: 'change' }],

		// form
		sc: [{ required: true, message: '请选择场地类别', trigger: 'change' }],
		eqGroup: [{ required: true, message: '请选择地震分组', trigger: 'change' }],
		dampRatio: [{ required: true, message: '请输入阻尼比', trigger: 'blur' }],
		// Amax
		amax6: [{ required: true, message: '请输入', trigger: 'blur' }],
		amax7: [{ required: true, message: '请输入', trigger: 'blur' }],
		amax8: [{ required: true, message: '请输入', trigger: 'blur' }],
		amax9: [{ required: true, message: '请输入', trigger: 'blur' }],
		amax10: [{ required: true, message: '请输入', trigger: 'blur' }],

		// tableData2：层参数
		// 建筑物宽度
		buildWidth: [{ required: true, message: '请输入', trigger: 'change' }],
		// 活荷载
		liveLoad: [{ required: true, message: '请输入', trigger: 'change' }],
		// 每榀间距
		trussSpacing: [{ required: true, message: '请输入', trigger: 'change' }],
		// 榀数
		numberOfPieces: [{ required: true, message: '请输入', trigger: 'change' }],
		//层高
		floorHeight: [{ required: true, message: '请输入', trigger: 'change' }],
		//活荷载
		liveLoad: [{ required: true, message: '请输入', trigger: 'change' }],

		// Ci系数表单验证规则
		ciType1Value: [{ required: true, message: '请选择', trigger: 'change' }],
		ciType2Value: [{ required: true, message: '请选择', trigger: 'change' }],
		ciType3Value: [{ required: true, message: '请选择', trigger: 'change' }],
		ciType4Value: [{ required: true, message: '请选择', trigger: 'change' }],
	},
	// 设防情况
	fortificationOptions: dictStore.fortificationOptions || [],
	// 年份
	yearsOptions: dictStore.yearsOptions || [],
	// 层数
	csOptions: dictStore.csOptions || [],
	// 结构类型
	structureTypeOptions: dictStore.structureTypeOptions2 || [],
	structureType1Options: [],
	// 砌体类别
	masonryTypeOptions: [],//dictStore.masonryTypeOptions || 
	// 砂浆强度等级
	mortarStrengthOptions: [],//dictStore.mortarStrengthOptions || 
	// 混凝土弹性模量Eb
	elasticModulusOptions: dictStore.elasticModulusOptions1 || [],
	// 用途
	useOptions: dictStore.useOptions || [],
	use1Options: [],
	//填充墙砌体类别
	bwCategoryOptions: [
		{
			value: '普通砖、多孔砖',
			label: '普通砖、多孔砖',
		},
		{
			value: '粉煤灰中砌块',
			label: '粉煤灰中砌块',
		},
		{
			value: '混凝土中砌块',
			label: '混凝土中砌块',
		},
		{
			value: '混凝土小砌砖',
			label: '混凝土小砌砖',
		},
		{
			value: '其他',
			label: '其他',
		},
	],
	scomOption: [//填充墙砂浆强度等级
		{
			value: 'M10',
			label: 'M10',
		},
		{
			value: 'M7.5',
			label: 'M7.5',
		},
		{
			value: 'M5',
			label: 'M5',
		},
		{
			value: 'M2.5',
			label: 'M2.5',
		},
		{
			value: 'M1',
			label: 'M1',
		},
		{
			value: 'M0.4',
			label: 'M0.4',
		},
	],
	// 建筑抗震设计规范预选项
	standardOptions: [
		{
			value: 10,
			label: '①符合《建筑抗震设计规范》（GBJ 11-89）',
		},
		{
			value: 11,
			label: '②符合标准Tj 11-1978要求',
		},
		{
			value: 12,
			label: '③符合标准Tj 11-1974要求，但不符合②',
		},
		{
			value: 13,
			label: '④符合《建筑抗震设计规范》（GB50011）',
		},
		{
			value: 14,
			label: '⑤其他',
		},
	],

	// 表格
	tableData3: [],
	tableData4: [],
	// 修正系数Ci的表头列
	tableCiColumn: [],
	// 修正系数Ci的原始数据
	ciData: [],
	// 修正系数Ci的表格选中行
	multipleSelection: [],

	// 场地类别选项
	siteTypeOptions: [
		{ value: '', label: '请选择' },
		{ value: 'I0', label: 'I0' },
		{ value: 'I1', label: 'I1' },
		{ value: 'II', label: 'II' },
		{ value: 'Ⅲ', label: 'Ⅲ' },
		{ value: 'Ⅳ', label: 'Ⅳ' },
	],
	// 设计地震分组选项
	groupOptions: [
		{ value: '', label: '请选择' },
		{ value: '第一组', label: '第一组' },
		{ value: '第二组', label: '第二组' },
		{ value: '第三组', label: '第三组' },
	],
	// 导入弹框
	showDialog: false,
	// 当前行数据
	curTableRow: {},
});

const {
	// 表单数据
	params,
	// 表单验证规则
	rules,
	// 设防情况选项
	fortificationOptions,
	// 年份选项
	yearsOptions,
	// 层数
	csOptions,
	// 结构类型选项
	structureTypeOptions,
	structureType1Options,
	// 砌体类别
	masonryTypeOptions,
	// 砂浆强度等级
	mortarStrengthOptions,
	// 混凝土弹性模量Eb
	elasticModulusOptions,
	// 用途选项
	useOptions,
	use1Options,
	bwCategoryOptions,
	scomOption,
	// 建筑抗震设计规范预选项
	standardOptions,

	// 表格数据
	tableData3,
	tableData4,
	tableData5,
	// 修正系数Ci的表头列
	tableCiColumn,
	// 修正系数Ci的原始数据
	ciData,
	// 修正系数Ci的表格选中行
	multipleSelection,

	siteTypeOptions,
	groupOptions,
	// 导入弹框
	showDialog,
	// 当前行数据
	curTableRow,
} = toRefs(data);

// 公式说明弹框是否显示
let importOpen = ref(false);
let titleExplain = ref('');
const handleExplain = (title) => {
	titleExplain.value = title;
	importOpen.value = true;
}

// 行政区划选择
const provinceData = ref([]); //省
const cityData = ref([]); //市
const areaData = ref([]); //区、县
/** 获取省列表 */
function getProvinceData() {
	getProvince().then((response) => {
		provinceData.value = response.data;
	});
}
// 选择省份
function chooseProvince(value) {
	params.value.city = null;
	params.value.county = null;
	params.value.province = value.name;
	cityData.value = [];
	areaData.value = [];
	getChildArea(value.id).then(response => {
		cityData.value = response.data;
	});
}
// 选择城市
function chooseCity(value) {
	params.value.city = value.name;
	params.value.county = null;
	areaData.value = [];
	getChildArea(value.id).then((response) => {
		areaData.value = response.data;
	});
}
// 选择区县
function chooseCounty(value) {
	params.value.county = value.name;
}

// 结构类型选择
const structureTypeChange = val => {
	const structureTypes = structureTypeOptions.value.find(item => item.value === val);
	if (structureTypes) {
		params.value.structureType1 = '';
		structureType1Options.value = structureTypes.children;
	}

};
// 选择用途
const useChange = (val) => {
	const use = useOptions.value.find(item => item.value === val)
	if (use) {
		use1Options.value = use.children
	}
}
// 选择是否对称配筋
const onChangeSymmReinfo = (val) => {
	if (val == 1) {
		rules.value.symmReinfo = [];
	} else {
		rules.value.symmReinfo = [{ required: true, message: '请选择', trigger: 'change' }];
	}
	// 表单验证
	formRef.value.validateField(['symmReinfo'], (valid) => {
		// 是对称配筋时，取消表单验证
		if (valid && val == 1) {
			return formRef.value.clearValidate('symmReinfo');
		}
	});
}

// 初始化获取数据
const getData = () => {
	const query = {
		calId: route.query.id
	};
	proxy.$modal.loading();
	getReinforcedByIdApi(query).then(res => {
		const { code, data, message } = res;
		if (code === 200 && data) {
			proxy.$modal.closeLoading();
			// 数据回显
			setData(data);
			const { ci, columnResult, storeyResult, entiretyResult } = data;
			// 柱数据
			params.value.tableData1 = [];
			if (columnResult && columnResult.length) {
				// 遍历设置梁数据
				columnResult.map(item => {
					if (!item.roofBeams || (item.roofBeams && item.roofBeams.length == 0)) {
						// 设置梁数据
						setRoofBeamsData(item);
					}
					params.value.tableData1.push({
						...item
					});
				})
			}
			// 层数据
			params.value.tableData2 = [];
			if (storeyResult && storeyResult.length) {
				params.value.tableData2 = storeyResult;
				params.value.nvalue = storeyResult[0].nvalue
			} else {
				if (columnResult && columnResult.length == 1) {
					params.value.tableData2.push({ floorNum: floor || 1 });
				}
			}
			// 获取用户
			if (data.createUser) {
				getUserInfo(data.createUser);
			}
		} else {
			params.value.tableData1 = [];
			params.value.tableData2 = [];
			params.value.tableData3 = [];
			params.value.tableData4 = [];
			tableData3.value = [];
			tableData4.value = [];
		}
	}).catch(err => {
		proxy.$modal.closeLoading();
		console.log(err);
	});
};
// 数据回显
// 计算结果的定义
let newArr = ref([]); // 表格数据
let labelArr = ref([]); // 表头数据
function setData(data) {
	console.log('数据回显', data);
	const { entiretyResult, columnResult, storeyResult, matrixResult, tcqResult, jlqResult } = data;
	// 基础数据
	if (entiretyResult && entiretyResult.length) {
		const obj = entiretyResult[0];
		if (obj) {
			params.value = {
				...obj,
				// Ci系数
				ciType1: obj.ciType1 || '现浇钢筋混凝土构件沿高度断面无突变',
				ciType2: obj.ciType2 || '平面规则',
				ciType3: obj.ciType3 || '施工质量良好',
				ciType4: obj.ciType4 || '建筑抗震设计规范',
				dampRatio: obj.dampRatio || undefined, // 阻尼比
				symmReinfo: obj.symmReinfo ? Number(obj.symmReinfo) : null, // 是否对称配筋
				createTime: parseTime(new Date()), //维护时间
				userName: userName.value, //维护人
				maintainerUnit: orgName.value, //维护人所属单位
				// calculate_or_not: columnResult[0].muz?'1':'0',
			};
			if (0 <= obj.cs <= 3) {
				params.value.cs = '1-3层';
			} else if (4 <= obj.cs <= 8) {
				params.value.cs = '4-8层';
			} else if (9 <= obj.cs) {
				params.value.cs = '9层以上';
			}
			// Amax
			params.value.tableDataAmax = [{
				'amax6': obj.amax6 || null,
				'amax7': obj.amax7 || null,
				'amax8': obj.amax8 || null,
				'amax9': obj.amax9 || null,
				'amax10': obj.amax10 || null,
			}]
		}
	}
	// 柱数据
	params.value.tableData1 = [];
	console.log(columnResult, '返回梁柱信息');
	if (columnResult) {
		columnResult.forEach(item => {
			params.value.tableData1.push({ ...item.roofBeam })
		})
	}
	// 梁柱计算结果
	params.value.tableData5 = columnResult || []
	// 层数据
	params.value.tableData2 = storeyResult || [];
	// 填充墙数据
	params.value.tableData3 = tcqResult || [];
	// 剪力墙数据
	params.value.tableData4 = jlqResult || [];
	// 计算结果
	if (matrixResult && matrixResult.length) {
		matrixResult.forEach(item => {
			labelArr.value.push(String(item.floorNum))
			let flag = false;
			flag = newArr.value.every(val => parseInt(val.si) != parseInt(item.si))
			if (flag) {
				newArr.value.push({
					entiretyId: item.entiretyId || '',
					number: item.number || '',
					floorNum: item.floorNum || '',
					si: item.si,
					[item.floorNum + 'qi']: item.qi,
					[item.floorNum + 'ui']: item.ui,
					[item.floorNum + 'damageCondition']: item.damageCondition,
					[item.floorNum + 'a1']: item.a1,
					[item.floorNum + 'qek']: item.qek,
					[item.floorNum + 'qmi']: item.qmi,
				})
			} else {
				newArr.value.forEach((val, index) => {
					if (val.si == item.si) {
						newArr.value[index] = {
							...val,
							[item.floorNum + 'qi']: item.qi,
							[item.floorNum + 'ui']: item.ui,
							[item.floorNum + 'damageCondition']: item.damageCondition,
							[item.floorNum + 'a1']: item.a1,
							[item.floorNum + 'qek']: item.qek,
							[item.floorNum + 'qmi']: item.qmi,
						}
					}
				})
			}
		})
		labelArr.value = [...new Set(labelArr.value)]
		newArr.value.forEach(item => {
			const arr = Object.values(item)
			if (arr.includes('毁坏')) {
				item.evaluationResult = '毁坏';
			} else {
				if (arr.includes('严重破坏')) {
					item.evaluationResult = '严重破坏';
				} else {
					if (arr.includes('中等破话')) {
						item.evaluationResult = '中等破话';
					} else {
						if (arr.includes('轻微破坏')) {
							item.evaluationResult = '轻微破坏';
						} else {
							if (arr.includes('基本完好')) {
								item.evaluationResult = '基本完好';
							}
						}
					}
				}
			}
		})
	}
}
// 获取用户
function getUserInfo(userId) {
	getInfo(userId).then(response => {
		params.value.userName = response.user.userName;
		params.value.maintainerUnit = response.user.orgName;
	});
};
//获取砌体类别、砂浆强度等级预选项值
function getAllCsValue() {
	getAllCsValueApi({
		titleName: '砌体非抗震设计的抗剪强度设计值'
	}).then(res => {
		const { code, data, msg } = res;
		if (code === 200 && data) {
			const { csValueList, dynamicFieldsList } = data
			// 砌体类别
			masonryTypeOptions.value.length = 0;
			const arrMasonryType = [];
			if (csValueList && csValueList.length) {
				csValueList.map(item => {
					if (item.ccsvType) {
						if (!arrMasonryType.includes(item.ccsvType)) {
							masonryTypeOptions.value.push({ value: item.ccsvType, label: item.ccsvType });
						}
						arrMasonryType.push(item.ccsvType);
					}
				})
			}
			// 砂浆强度等级
			mortarStrengthOptions.value.length = 0;
			const arrDynamicFields = [];
			if (dynamicFieldsList && dynamicFieldsList.length) {
				dynamicFieldsList.map(item => {
					if (item.info) {
						if (!arrDynamicFields.includes(item.info)) {
							mortarStrengthOptions.value.push({ value: item.info, label: item.info });
						}
						arrMasonryType.push(item.ccsvType);
					}
				})
			}
		} else {
			proxy.$modal.msgWarning(msg || '获取砌体类别、砂浆强度等级失败！');
		}
	}).catch(err => {
		proxy.$modal.msgWarning(err.message || '获取砌体类别、砂浆强度等级失败！');
	});
}

// 设置ci数据
function setCiData(ci) {
	// 存ci列和值
	tableCiColumn.value = ci.dynamicFieldsEntityList || [];
	ciData.value = ci.structureCiList || [];
	// 选中的Ci值
	const arrCheckedCi = [];
	multipleSelection.value.length = 0;
	if (ci.entiretyCiList && ci.entiretyCiList.length) {
		ci.entiretyCiList.map(item => {
			arrCheckedCi.push(item.ciId);
		})
	}
	// 修正系数表格数据
	tableData3.value.length = 0;
	let arrConditions = [];
	if (ci.structureCiList && ci.structureCiList.length) {
		ci.structureCiList.map((item, index) => {
			if (item.condition) {
				// 不包含则添加
				if (!arrConditions.includes(item.condition)) {
					arrConditions.push(item.condition);
					var curObj = { ...item };
					ci.structureCiList.filter(item1 => item1.condition == item.condition).map(item1 => {
						// 设置列的值
						curObj['content' + item1.projectId] = item1.conditionValue;
					})
					tableData3.value.push({
						...curObj,
					});
				}
			}
		})
		if (arrCheckedCi.length) {
			// 表格渲染后设置选中状态
			nextTick(() => {
				tableData3.value.map(item => {
					// 如果包含id则选中
					if (arrCheckedCi.includes(item.ccsrId) && ciTableRef.value && ciTableRef.value.toggleRowSelection) {
						// 设置选中效果
						ciTableRef.value.toggleRowSelection(item, true);
					}
				});
			})
		}
	}
}
// 设置梁数据
function setRoofBeamsData(item = {}) {
	// 梁数据
	const arrRoofBeams = [];
	let len = 4;
	// 边柱两条梁
	if (item.pillarPosition == '边柱') {
		len = 2;
	}
	for (let i = 0; i < 2; i++) {
		arrRoofBeams.push({
			// 梁编号
			beamNum: 'i' + (i + 1),
			// 梁高
			beamHeigth: null,
			// 梁截面宽
			beamSectionWidth: null,
			// 梁截面高
			beamSectionHeight: null,
			// 梁的弹性模量
			el: undefined,
		})
	}
	item.roofBeams = arrRoofBeams;
	return item;
}
// 表格点击选中行事件
function handleRowClick(row) {
	curTableRow.value = row;
	if (ciTableRef.value && ciTableRef.value.toggleRowSelection) {
		// 设置选中效果
		ciTableRef.value.toggleRowSelection(row);
	}
}
// 表格行复选框勾选事件
function handleSelect(selection, row) {
	curTableRow.value = row;
}
// 表格多选事件
function handleSelectionChange(val) {
	// 处理标准只选一个标准
	if (curTableRow.value.condition && curTableRow.value.condition.match(/^符合.*/gi)) {
		multipleSelection.value = val.filter(item => {
			// 过滤选中数据
			if (item.condition && item.condition.match(/^符合.*/gi) && curTableRow.value.condition != item.condition) {
				// 取消选中效果
				if (ciTableRef.value && ciTableRef.value.toggleRowSelection) {
					ciTableRef.value.toggleRowSelection(item, false);
				}
				return false;
			} else {
				return true;
			}
		});
	} else {
		multipleSelection.value = val;
	}
}

// 设置接口参数
function setApiParams() {
	let apiParams = {
		// 柱参数
		"columnPam": [...params.value.tableData1],
		// 层参数
		"storeyPam": [...params.value.tableData2],
		"tcqPam": [...params.value.tableData3],
		"jlqPam": [...params.value.tableData4],
		// 基础参数
		"entiretyPam": [{
			...params.value,
			dataType: '1',
			// Amax
			...(params.value.tableDataAmax[0] || {}),
		}],
	};
	if (!(params.value.tableData1 && params.value.tableData1.length)) {
		proxy.$modal.msgWarning('请输入或导入柱数据！');
		return false;
	}
	// 层
	if (!(params.value.tableData2 && params.value.tableData2.length)) {
		proxy.$modal.msgWarning('请输入层数据！');
		return false;
	}
	return apiParams;
}
//计算
const onRecalculate = async formEl => {
	if (!formEl) return;
	// 表单验证
	const formElValid = await formEl.validate((valid, fields) => { valid, fields });
	if (formElValid) {
		// 接口参数
		const apiParams = setApiParams();
		if (apiParams) {
			proxy.$modal.loading('正在努力计算,请耐心等待！');
			//计算
			reinforcedCalculationApi(apiParams).then(res => {
				proxy.$modal.closeLoading();
				const { code, data, message } = res;
				if (code == 200 && data) {
					proxy.$modal.msgSuccess('计算成功！计算结果未保存，若需保存结果，请计算后点击保存按钮！');
					// 数据回显
					setData(data);
					const { ci, columnResult, storeyResult } = data;
					// 柱数据
					params.value.tableData1 = [];
					if (columnResult && columnResult.length) {
						// 遍历设置梁数据
						columnResult.map(item => {
							params.value.tableData1.push({
								...item
							});
						})
					}
					// 层数据
					params.value.tableData2 = [];
					if (storeyResult && storeyResult.length) {
						params.value.tableData2 = storeyResult;
					} else {
						if (columnResult && columnResult.length == 1) {
							params.value.tableData2.push({ floorNum: floor || 1 });
						}
					}
					params.value.calculate_or_not = '0'; // 已计算
				} else {
					proxy.$modal.msgWarning(message || '计算失败！');
				}
			}).catch(err => {
				proxy.$modal.closeLoading();
				console.log(err.message || '计算失败！');
			})
		}
	} else {
		proxy.$modal.msgWarning('表单验证失败，请检测填写数据！');
	}
};
//保存
const onSave = async formEl => {
	if (!formEl) return;
	// 表单验证
	await formEl.validate((valid, fields) => {
		if (valid) {
			//保存
			reinforcedSaveApi({
				calId: params.value.calId,
			}).then(res => {
				const { code, data, message } = res;
				if (code == 200) {
					// params.value.calculate_or_not = '1'; // 已计算
					proxy.$modal.msgSuccess('保存成功！');
					close()
				} else {
					proxy.$modal.msgWarning(message || '保存失败！');
				}
			}).catch(err => {
				console.log(err.message || '保存失败！');
			})
		} else {
			proxy.$modal.msgWarning('表单验证失败，请检测填写数据！');
		}
	});
};
/** 保存成功返回查询页 */
function close() {
  const obj = { path: "/buildingVulnerAnalysis/statisticalAnalysis/reinforcedState/reinforcedInquire" };
  proxy.$tab.closeOpenPage(obj);
};
//重置
const onRest = formEl => {
	// 重置表单，方式一
	params.value={}
	formEl.resetFields();
	// 重置表单，方式二
	// proxy.resetForm('formRef');
};
//导入参数
const onImport = (response, uploadFile, uploadFiles) => {
	const { code, data } = response;
	if (code == 200) {
		// proxy.$modal.msg('导入数据成功!');
		// 根据结果渲染数据
		renderByData(data);
		nextTick(()=>{
			params.value.calculate_or_not='0'
		})
	}
};

// 地震剪力计算，场地类别选择
function onChangeType(val) {
}
// 地震剪力计算，设计地震分组选择
function onChangeGroup(val) {

}
// 增加表格行数据
const handleCalcAdd = (tableData, tableName) => {
	// 标注号自增
	if (tableName == 'table1' || tableName == 'table2') {
		params.value.tableData1.push({});
		params.value.tableData5.push({});
		// 设置梁数据
	} else if (tableName == 'table3') {
		params.value.tableData3.push({});
	} else if (tableName == 'table4') {
		params.value.tableData4.push({});
	} else if (tableName == 'floorTable') {
		params.value.tableData2.push({liveLoad:10,});
	}
	else if (tableData && tableData.hasOwnProperty('length')) {
		tableData.push({});
	}
}
// 删除表格行数据
const handleCalcRemove = (tableData, index) => {
	if (tableData && tableData.length) {
		proxy.$modal.confirm('确定删除？').then(() => {
			tableData.splice(index, 1);
		})
	}
}

// 根据结果渲染数据
function renderByData(data) {
	if (data) {
		// 数据回显
		setData(data);

		const { ci, columnResult, storeyResult } = data;
		// 柱数据
		params.value.tableData1 = [];
		if (columnResult && columnResult.length) {
			// 遍历设置梁数据
			columnResult.map(item => {
				// if (!item.roofBeams || (item.roofBeams && item.roofBeams.length == 0)) {
				// 	// 设置梁数据
				// 	setRoofBeamsData(item);
				// }
				params.value.tableData1.push({
					...item
				});
			})
		}
		// 层数据
		params.value.tableData2 = [];
		if (storeyResult && storeyResult.length) {
			params.value.tableData2 = storeyResult;
		} else {
			if (columnResult && columnResult.length == 1) {
				params.value.tableData2.push({ floorNum: floor || 1 });
			}
		}
		// 获取用户
		if (data.createUser) {
			getUserInfo(data.createUser);
		}
		// 钢筋混凝土结构房屋修正系数Ci值
		// if (ci) {
		// 	// 设置ci数据
		// 	setCiData(ci);
		// }
	} else {
		params.value.tableData1 = [];
		params.value.tableData2 = [];
		params.value.tableData3 = [];
		params.value.tableData4 = [];
		params.value.tableData5 = [];
		tableData4.value = [];
	}
}
// 查询
const onSearch = () => {
	const query = {
		number: route.query.number,
		dataType: route.query.dataType,
		dataId: route.query.pid,
	};
	getDataById(query).then(res => {
		const { code, data, message } = res;
		if (code === 200) {		
			// 根据结果渲染数据
			renderByData(data);
		}
	}).catch(err => {
		console.log(err);
	});
};
// 挂载
onMounted(() => {
	const isLook = route.query.isLook
	if (isLook) {
		// 初始化获取数据,回显
		onSearch();
	} else {
		// 编辑页
		if (isAdd.value) {
			// 获取登录用户信息
			params.value.userName = userName.value;
			params.value.maintainerUnit = orgName.value;
			// 只有一个结构类型，默认选中
			if (structureTypeOptions.value?.length) {
				params.value.structureType = structureTypeOptions.value[0].value || '';
				// params.value.structureType = structureType;
				structureTypeChange()
				// 结构类型选择
				structureTypeChange(params.value.structureType);
			}
		}
		// 初始化获取数据
		getData();
	}
	// 获取行政区划数据
	getProvinceData();
	//获取砌体类别、砂浆强度等级预选项值
	getAllCsValue();
});
</script>

<style lang="scss" scoped>
.table-wrapper {
	position: relative;

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		font-weight: bold;
	}

	h4 {
		font-size: 16px;
		color: #107ce5;
		text-align: center;
	}
}

.page-panel {
	margin-top: 40px;
}

.form-inline {
	.el-form-item {
		margin-right: 0;
	}
}

// Ci系数
.ci-form {
	padding: 0 50px;

	:deep(.el-form-item) {
		.el-form-item__label {
			text-align: left;
		}
	}
}

.listTable {
	margin-top: 20px;

	// 表格格子内边距
	// th.el-table__cell>.cell {
	// 	padding: 8px 12px;
	// }

	.child-table {
		border-top: 1px solid #eeeeee;
		padding: 0 20px 20px;
	}
}

.formula-result {
	display: inline-block;
	vertical-align: middle;
	width: 200px;
}

.mcyu-mcyl {
	float: right;
	margin-right: 200px;
	margin-top: -20px;
	display: inline-block;
	height: 70px;
	line-height: 70px;
	border: 1px solid #666666;
	padding: 0 20px;
}

// 字体红色
.color-red {
	color: red !important;
}

// 字体蓝色
.color-blue {
	color: #107ce5 !important;
	cursor: pointer;
}

:deep(.elTable) {
	border: 1px solid FaFaFa;
	width: 100%;
	border-collapse: collapse;
	thead.is-group tr:first-of-type th:first-of-type {
		border-bottom: none!important;;
		/*中间的横线去掉*/
	}
	thead.is-group th {
		background: none;
	}
	thead.is-group tr:first-of-type th:first-of-type:before {
		content: "";
		position: absolute;
		width: 1px;
		height: 0px;
		top: 0;
		left: 0;
		background-color: #FaFaFa;
		opacity: 0.3;
		display: block;
		transform: rotate(-60deg);
		transform-origin: top;
	}

	thead.is-group tr:last-of-type th:first-of-type:before {
		content: "";
		position: absolute;
		width: 0.5px;
		height: 320px;
		bottom: 0px;
		right: 0px;
		background-color: #FaFaFa !important;
		/* opacity: 0.3; */
		display: block;
		transform: rotate(-65.5deg);
		transform-origin: bottom;
	}

	.el-table__header-wrapper th {
		// background-color: white !important;
	}

	td.el-table__cell {
		border-right: 1px solid #FaFaFa !important;
		border-bottom: 1px solid #FaFaFa !important;
	}

	.el-table--scrollable-x .el-table__body-wrapper {
		overflow: auto !important;
	}

	thead.is-group tr:first-of-type th:first-of-type div.cell {
        text-align: right!important;/*上边文字靠右*/
    }

    thead.is-group tr:last-of-type th:first-of-type div.cell {
        text-align: left!important;/*下边文字靠左*/
    }
}
</style>